This is my android manifest.xml which links to theme.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brokenphysics.issb">
<uses-permission android:name="android.permission.VIBRATE" />
<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="@style/Theme.ISSB">
<activity
android:name=".MainActivity"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
This is my theme.xml
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.ISSB" parent="Theme.AppCompat.NoActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
what ever I do I can't get the app to go fullscreen and hide the status and navigation bars.
CodePudding user response:
currently you are removing only ActionBar/Toolbar/title, which belongs to your Activity
(which fits by default between status bar and navigation bar, both visible). And you are looking for Immersive mode, check out official DOC how to enable (hint: you need also Java/Kotlin code, you won't style it with XML only)
CodePudding user response:
//Hide Statusbar
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
this code will hide status bar