mgks / Android-SmartWebView

A simple use webview integrated w/ native features to help create most advanced hybrid applications.
https://mgks.dev/smart-webview
MIT License
571 stars 278 forks source link

Web Title Or Name Drawer Menu In Actionbar #155

Open ReyKar opened 4 years ago

ReyKar commented 4 years ago

Please help me, anyone who can please directly comment, I want to add a web title to the actionbar.

I can already add with this tutorial https://android--code.blogspot.com/2016/01/android-how-to-get-webview-loaded-page.html

The problem is that the url is loaded even though only the mTitle code is installed, the tutorial above loads the URL in the actionbar first and then loads the web title.

What I want / need is to load the actionbar title according to the web directly without waiting for the url to load.

Or you can also drawer menu name if the menu name is example: Home > then the actionbar title is also Home

Please help, thank you!

ReyKar commented 4 years ago

I use Android Smart WebView

ReyKar commented 4 years ago

There are 2 options, please choose the easiest to apply to smv.

  1. using the web title
  2. using the name on the drawer menu> drawer menu name> actionbar name is also the same
ReyKar commented 4 years ago

@djmike3404 @mgks @pauln @timhj @starman1108 @shabeebqadir @saeedesfandi @hongwen000 @dambusm and other

or if you can use the name on the drawer menu, for example the name of the drawer menu is Admob, then the name of the actionbar title is also admob

ezgif-4-1194c34411a8

djmike3404 commented 4 years ago

@ReyKar I'm confused as to why I'm receiving info on this thread when I have no involvement with it

mgks commented 4 years ago

use this getSupportActionBar().setTitle("Your Title");, you can put it inside onNavigationItemSelected() or onProgressChanged().

Also, please don't mention anybody randomly here, as @djmike3404 is getting notifications regarding this issue for no reason.