Im learning, stuck at simple problem of removing Android's action bar and seting app to full screen. Whole app should be in fullscreen, so I started with Manifest
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">
<activity
android:name=".Main"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
UI stays exactly the same = Stuck at default Look. Alright next I tried changing looks in Android studio GUI for activity_main.xml screen. That changes Design preview, but no effect in actual app. Still the same. Is this meant to change app or just design preview btw?
I tried changing in
<activity
android:name=".Main"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
:theme
to @android:style/Theme.Holo.Light.NoActionBar.Fullscreen
but now app crashes on startup.
I also tried making Custom theme in styles.xml
, like this
<style name="CustomMyTheme" parent="AppTheme">
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
But same results. I don't understand why changing theme in manifest does not work. Is there some conflict in api version? Minimum is set to 15, 26 target and 22 emulator's version.