2

I made a web view app with navigation drawer and it is working fine but the only problem is the settings option in the right corner... Can I edit or remove it??

please check the pics : https://ibb.co/mVqbRR https://ibb.co/n8d7Y6

7
  • post your code activity_main .xml Oct 27, 2017 at 5:05
  • i posted it check it.. thanks Oct 27, 2017 at 5:51
  • please check my updated answer Oct 27, 2017 at 6:00
  • Thanks I removed WebView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/mywebview"/> from activity main and it is working fine Oct 27, 2017 at 6:08
  • you want to remove or what? post your code and explain what is your problem, to better understand to every one Oct 27, 2017 at 6:21

3 Answers 3

3

In your MainActivity you will have optionmenu, just make it false

@Override
 public boolean onCreateOptionsMenu(Menu menu) {
       return false;
 }

I hope this will solve your problem..

1
  • it's not a settings option in the right corner...The button name called overflow menu. Oct 27, 2017 at 7:33
2

You can find it in res / menu / main.xml

1

Try in this way. This code works fine for me

    myWebView = (WebView) view.findViewById(R.id.webview);
    myWebView.clearCache(true);
    myWebView.getSettings().setJavaScriptEnabled(true);
    myWebView.getSettings().setUseWideViewPort(true);
    myWebView.getSettings().setLoadWithOverviewMode(true);
    myWebView.getSettings().setAllowContentAccess(true);
    myWebView.getSettings().setDomStorageEnabled(true);
    myWebView.clearCache(true);
    myWebView.clearHistory();
    myWebView.setWebChromeClient(new WebChromeClient());
    myWebView.setWebViewClient(new ProgressWeb(getActivity()));
    myWebView.loadUrl("http://google.com");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.