Skip to content Skip to sidebar Skip to footer

Android App Fullscreen With No Title Bar And No Action Bar

I am trying to create my first Android app with a WebView. The last issue I am trying to resolve is to have the WebView in fullscreen with no title bar and no action bar. My Manife

Solution 1:

Hope this solve your issue,

Change you AndroidManifest.xml theme from,

 android:theme="@style/AppTheme.NoActionBar"

TO

android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"

Solution 2:

Do this in Activity

    if (Build.VERSION.SDK_INT < 16) {
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
    else
    {
        View decorView = getWindow().getDecorView();
        //Hide the status bar.
        int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
        decorView.setSystemUiVisibility(uiOptions);
    }

and do the following in AndroidManifest

<activity            
        ......................................
        android:screenOrientation="portrait"        <!--if you want to lock orientation-->
        android:theme="@style/Theme.AppCompat.NoActionBar" 
        ..................................... >
</activity>

Post a Comment for "Android App Fullscreen With No Title Bar And No Action Bar"