i trying implement material design webviewclient
. webviewclient
opens index.html
saved in asset. want achieve when home page, index.html
opened, there shouldn't "up button". "up button" should shown when click on link in index.html
. have tried
getsupportactionbar().setdisplayhomeasupenabled(true);
but apparently, show "up button" of pages. how hide "up button" homepage, index.html
?
problem solved adding under onpagefinished
in webviewclient
public void onpagefinished(webview view, string url) { if (url.equals("file:///android_asset/index.html")) { getsupportactionbar().setdisplayhomeasupenabled(false); } else { getsupportactionbar().setdisplayhomeasupenabled(true); } super.onpagefinished(view, url); }
Comments
Post a Comment