Merge pull request #300 from cyb3rko/fix-bugged-statusbar

Fix and further improve status bar & nav bar
This commit is contained in:
Jannis Mattheis
2023-06-23 10:15:35 +02:00
committed by GitHub
6 changed files with 15 additions and 20 deletions

View File

@@ -40,7 +40,7 @@
android:name=".login.LoginActivity" android:name=".login.LoginActivity"
android:exported="false" android:exported="false"
android:label="Login" android:label="Login"
android:theme="@style/AppTheme.NoActionBar" android:theme="@style/AppTheme.NoActionBar.Login"
android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" />
<activity <activity
android:name=".log.LogsActivity" android:name=".log.LogsActivity"

View File

@@ -5,7 +5,6 @@
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start"> tools:openDrawer="start">
<androidx.coordinatorlayout.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
@@ -91,7 +90,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:fitsSystemWindows="true"
app:theme="@style/AppTheme.Nav" app:theme="@style/AppTheme.Nav"
app:headerLayout="@layout/nav_header_drawer" app:headerLayout="@layout/nav_header_drawer"
app:menu="@menu/messages_menu" /> app:menu="@menu/messages_menu" />

View File

@@ -23,7 +23,6 @@
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:paddingTop="@dimen/nav_header_vertical_spacing" android:paddingTop="@dimen/nav_header_vertical_spacing"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:layout_marginTop="30dp"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/gotify" /> app:srcCompat="@drawable/gotify" />

View File

@@ -1,10 +0,0 @@
<resources>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!--Android 5.x should set statusBarColor with transparent, or statusBar will be grey-->
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
</resources>

View File

@@ -3,5 +3,5 @@
<dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="nav_header_vertical_spacing">8dp</dimen> <dimen name="nav_header_vertical_spacing">8dp</dimen>
<dimen name="nav_header_height">196dp</dimen> <dimen name="nav_header_height">166dp</dimen>
</resources> </resources>

View File

@@ -14,17 +14,25 @@
<style name="AppTheme.NoActionBar"> <style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<!--Android 5.x should set statusBarColor with transparent, or statusBar will be grey--> <item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="AppTheme.NoActionBar.Login">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:statusBarColor">@android:color/transparent</item> <item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowTranslucentStatus">true</item> <item name="android:windowLightStatusBar">?isLightTheme</item>
</style> </style>
<style name="AppTheme.SplashScreen" parent="Theme.SplashScreen"> <style name="AppTheme.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenAnimatedIcon">@drawable/gotify_splash</item> <item name="windowSplashScreenAnimatedIcon">@drawable/gotify_splash</item>
<item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item> <item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item>
<!--Android 5.x should set statusBarColor with transparent, or statusBar will be grey--> <item name="android:navigationBarColor">?attr/colorSurface</item>
<item name="android:statusBarColor">@android:color/transparent</item> <item name="android:statusBarColor">?attr/colorSurface</item>
<item name="android:windowTranslucentStatus">true</item> <item name="android:windowLightStatusBar">?attr/isLightTheme</item>
</style> </style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.Dark" /> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.Dark" />