I am developing one Android application in which I need to open the URL in the default browser. But I do not want to show the address bar of the browser. How to solve the problem? Thanks for any help.
public class WebViewDemoActivity extends Activity { WebView webView; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); webView = (WebView) findViewById(R.id.yourwebview); // force web view to open inside application webView.setWebViewClient(new MyWebViewClient()); openURL(); } private void openURL() { webView.loadUrl("http://google.co.in"); } private class MyWebViewClient extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } }
And the demo code link here is
Source: https://habr.com/ru/post/1492867/More articles:WPF Animation not starting for the first time - wpfHome key processed in ice cream sandwich - androidDynamicMethods, expression trees and DLR - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1492865/edittext-jumps-to-next-edittext-after-reaching-the-maximum-edittext-length&usg=ALkJrhjoROc8rrfID3xNbyKDHcQnVe_H6w.NET Dynamic Method. Best Performance - optimizationHow to change image size via php script - phpwhy should we use Exception as a superclass, why not BaseException - pythonDoes Excel SqlBulkCopy work differently on the local computer and on the application server? - c #How to add a command hook in setuptools setup? - pythonWhy can't I create a list <> using myObject? - c #All Articles