1

I am doing some pretty basic html displays using WebView and all is working well. One thing that I would like to do is as the user navigates between pages update the application label. I believe I'm calling it the correct name as Application label. This is the area where your string app_name is displayed via the manifest.

So anyway I would like to update it to say the tag of each page but I am not sure where to begin researching that type of interaction if it's possible. The other option as I've seen others do, but don't know how is to get my WebView to cover the application label area..or remove it or whatever it is they do. Once removed I'll just add a to my page displaying the .

TIA JB

GPGVM
  • 5,515
  • 10
  • 56
  • 97
  • Found the perfect answer here: http://stackoverflow.com/questions/3250034/android-webview-intercept-clicks – GPGVM May 04 '12 at 17:24

1 Answers1

1

This is the area where your string app_name is displayed via the manifest.

My guess is that you are referring to the title bar (on older devices) or the action bar (on newer devices, plus older devices using ActionBarSherlock).

You can modify the text displayed there by calling setTitle() in your activity.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Yes I have done that before in the activity but how do I get there from a WebView. My HTML page loads via WebView. The user click a link in html and the next page loads. All this happens internal to the WebView. I guess what I'm looking for is if I can handle events of the WebView like OnNavigate....I just made that up as an example. – GPGVM May 04 '12 at 14:53
  • As an update I see "Protected Methods" which alot of them look like events??? Is that what the Guys at Google call events? – GPGVM May 04 '12 at 15:01
  • @user1278561: "I'm looking for is if I can handle events of the WebView like OnNavigate" -- you are welcome to use `addJavascriptInterface()` to inject a Java object into JavaScript as a pseudo-global, then adjust your JavaScript to call methods on that Java object as you see fit. – CommonsWare May 04 '12 at 15:48