Skip to content

Commit 8649679

Browse files
authored
Merge pull request #300 from cyb3rko/fix-bugged-statusbar
Fix and further improve status bar & nav bar
2 parents 7f5f744 + 2edfb6a commit 8649679

File tree

6 files changed

+15
-20
lines changed

6 files changed

+15
-20
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
android:name=".login.LoginActivity"
4141
android:exported="false"
4242
android:label="Login"
43-
android:theme="@style/AppTheme.NoActionBar"
43+
android:theme="@style/AppTheme.NoActionBar.Login"
4444
android:windowSoftInputMode="adjustResize" />
4545
<activity
4646
android:name=".log.LogsActivity"

app/src/main/res/layout/activity_messages.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
android:id="@+id/drawer_layout"
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
8-
android:fitsSystemWindows="true"
98
tools:openDrawer="start">
109

1110
<androidx.coordinatorlayout.widget.CoordinatorLayout
@@ -91,7 +90,6 @@
9190
android:layout_width="wrap_content"
9291
android:layout_height="match_parent"
9392
android:layout_gravity="start"
94-
android:fitsSystemWindows="true"
9593
app:theme="@style/AppTheme.Nav"
9694
app:headerLayout="@layout/nav_header_drawer"
9795
app:menu="@menu/messages_menu" />

app/src/main/res/layout/nav_header_drawer.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
android:focusableInTouchMode="true"
2424
android:paddingTop="@dimen/nav_header_vertical_spacing"
2525
android:scaleType="fitCenter"
26-
android:layout_marginTop="30dp"
2726
app:layout_constraintTop_toTopOf="parent"
2827
app:layout_constraintStart_toStartOf="parent"
2928
app:srcCompat="@drawable/gotify" />

app/src/main/res/values-v21/styles.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/src/main/res/values/dimens.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<dimen name="activity_horizontal_margin">16dp</dimen>
44
<dimen name="activity_vertical_margin">16dp</dimen>
55
<dimen name="nav_header_vertical_spacing">8dp</dimen>
6-
<dimen name="nav_header_height">196dp</dimen>
6+
<dimen name="nav_header_height">166dp</dimen>
77
</resources>

app/src/main/res/values/styles.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,25 @@
1414
<style name="AppTheme.NoActionBar">
1515
<item name="windowActionBar">false</item>
1616
<item name="windowNoTitle">true</item>
17-
<!--Android 5.x should set statusBarColor with transparent, or statusBar will be grey-->
17+
<item name="android:navigationBarColor">@android:color/transparent</item>
18+
<item name="android:statusBarColor">@color/colorPrimary</item>
19+
<item name="android:windowLightStatusBar">false</item>
20+
</style>
21+
22+
<style name="AppTheme.NoActionBar.Login">
23+
<item name="windowActionBar">false</item>
24+
<item name="windowNoTitle">true</item>
25+
<item name="android:navigationBarColor">@android:color/transparent</item>
1826
<item name="android:statusBarColor">@android:color/transparent</item>
19-
<item name="android:windowTranslucentStatus">true</item>
27+
<item name="android:windowLightStatusBar">?isLightTheme</item>
2028
</style>
2129

2230
<style name="AppTheme.SplashScreen" parent="Theme.SplashScreen">
2331
<item name="windowSplashScreenAnimatedIcon">@drawable/gotify_splash</item>
2432
<item name="postSplashScreenTheme">@style/AppTheme.NoActionBar</item>
25-
<!--Android 5.x should set statusBarColor with transparent, or statusBar will be grey-->
26-
<item name="android:statusBarColor">@android:color/transparent</item>
27-
<item name="android:windowTranslucentStatus">true</item>
33+
<item name="android:navigationBarColor">?attr/colorSurface</item>
34+
<item name="android:statusBarColor">?attr/colorSurface</item>
35+
<item name="android:windowLightStatusBar">?attr/isLightTheme</item>
2836
</style>
2937

3038
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.Material3.Dark" />

0 commit comments

Comments
 (0)