1. Hot New Devices! HTC One M9 | Samsung Galaxy S6 | LG G4

Hide Address Bar after page load


  1. devguy

    devguy New Member

    Hi,
    I've created a WebView app and everything works fine.
    The only remaining feature I need for the app is to hide the address bar after, because I want the app to look more like a regular app and not a webpage within a web browser window.

    My code looks like this,

    Code (Text):
    1. package com.mobile.app;
    2.  
    3. import android.app.Activity;
    4. import android.os.Bundle;
    5. import android.view.WindowManager;
    6. import android.webkit.WebView;
    7.  
    8. public class NormalActivity extends Activity {
    9.     /** Called when the activity is first created. */
    10.     @Override
    11.     public void onCreate(Bundle savedInstanceState) {
    12.         super.onCreate(savedInstanceState);
    13.         setContentView(R.layout.main);
    14.        
    15.         final WebView wv = (WebView) findViewById(R.id.helloWebView);
    16.         wv.getSettings().setJavaScriptEnabled(true);
    17.         wv.loadUrl("http://www.google.com");
    18.        
    19.        
    20.        
    21.     }
    22. }
    Any help or ideas? Thanks in advance.

    Advertisement

Share This Page