force transparent navigation bar on home screen

This commit is contained in:
Josia Pietsch 2024-09-11 21:47:00 +02:00
parent 6e28fbfea5
commit 6d1e4a3780
Signed by: jrpie
GPG key ID: E70B571D66986A2D
5 changed files with 21 additions and 0 deletions

View file

@ -24,6 +24,7 @@
android:excludeFromRecents="true" android:excludeFromRecents="true"
android:clearTaskOnLaunch="true" android:clearTaskOnLaunch="true"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:theme="@style/launcherHomeTheme"
android:launchMode="singleTask" > android:launchMode="singleTask" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View file

@ -7,6 +7,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:longClickable="false" android:longClickable="false"
android:fitsSystemWindows="true"
tools:context=".ui.HomeActivity"> tools:context=".ui.HomeActivity">
<TextView <TextView

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="launcherHomeTheme" parent="launcherBaseTheme">
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:enforceNavigationBarContrast">false</item>
<!--<item name="android:windowDrawsSystemBarBackgrounds">true</item>-->
</style>
</resources>

View file

@ -21,6 +21,12 @@
<item name="android:windowAnimationStyle">@style/WindowFadeTransition</item> <item name="android:windowAnimationStyle">@style/WindowFadeTransition</item>
</style> </style>
<style name="launcherHomeTheme" parent="launcherBaseTheme">
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<!--<item name="android:windowDrawsSystemBarBackgrounds">true</item>-->
</style>
<style name="colorThemeDark"> <style name="colorThemeDark">
<item name="colorPrimary">@color/darkTheme_background_color</item> <item name="colorPrimary">@color/darkTheme_background_color</item>
<item name="colorPrimaryDark">@color/darkTheme_background_color</item> <item name="colorPrimaryDark">@color/darkTheme_background_color</item>

View file

@ -103,12 +103,15 @@
app:allowDividerAbove="false"> app:allowDividerAbove="false">
<SwitchPreference <SwitchPreference
android:key="@string/settings_display_full_screen_key" android:key="@string/settings_display_full_screen_key"
android:defaultValue="true"
android:title="@string/settings_display_full_screen"/> android:title="@string/settings_display_full_screen"/>
<SwitchPreference <SwitchPreference
android:key="@string/settings_display_rotate_screen_key" android:key="@string/settings_display_rotate_screen_key"
android:defaultValue="false"
android:title="@string/settings_display_rotate_screen"/> android:title="@string/settings_display_rotate_screen"/>
<SwitchPreference <SwitchPreference
android:key="@string/settings_display_screen_timeout_disabled_key" android:key="@string/settings_display_screen_timeout_disabled_key"
android:defaultValue="false"
android:title="@string/settings_display_screen_timeout_disabled"/> android:title="@string/settings_display_screen_timeout_disabled"/>