Skip to content
Related Articles
Open in App
Not now

Related Articles

How to Enable Full-Screen Mode in Android?

Improve Article
Save Article
  • Last Updated : 16 Sep, 2021
Improve Article
Save Article

In this article, we are going to learn how to enable full screen in Android Studio. Like if we are especially viewing an image then we want to view that on full screen. Here what we are going to implement is that we are basically hiding the navigation, status bar, and enabling the full-screen mode. We are going to discuss 4 different methods for doing this task.

Method 1

Following is the code to hide the navigation and enabling full-screen mode.

// This is the code to hide the navigation and enabling full screen mode
View.SYSTEM_UI_FLAG_IMMERSIVE
                            // Set the content to appear under the system bars so that the
                            // content doesn't resize when the system bars hide and show.
                            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                            // Hide the nav bar and status bar
                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_FULLSCREEN);

Method 2

Made these changes in your manifest.xml file

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

Method 3

Made these changes in your styles.xml file

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->

    <item name="android:windowFullscreen">true</item>
</style>

Method 4

Made these changes in your styles.xml file

<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!