Android Full Screen Activity

In the application, I wanted all of the activities to display the Action Bar except the WebView.  To accomplish this, I created a new AppThem.NoActionBar which keeps the same style as the rest of the application, except disables the Action Bar and the Title.

<style name="AppTheme.NoActionBar" parent="AppTheme">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

Then we can assign the AppTheme.NoActionBar theme to just those activities that should not have the Action Bar. All of the remaining activities will keep AppTheme.

<activity android:name=".WebViewActivity"
    android:theme="@style/AppTheme.NoActionBar">
    <intent-filter>
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

Reference:

Leave a Reply

Your email address will not be published. Required fields are marked *