Skip to content

Commit

Permalink
Navigation view fits system windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mygod committed Dec 22, 2018
1 parent fe68f36 commit 6dd50a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions mobile/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/Theme.Shadowsocks.Navigation"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand Down
7 changes: 5 additions & 2 deletions mobile/src/main/res/layout/layout_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/snackbar"
android:clipChildren="false"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<FrameLayout
android:id="@+id/fragment_holder"
Expand Down Expand Up @@ -124,6 +126,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:itemIconTint="@color/nav_item_tint"
app:itemTextColor="@color/nav_item_tint"
app:headerLayout="@layout/navigation_header"
Expand Down
7 changes: 7 additions & 0 deletions mobile/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Shadowsocks.Navigation">
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>

0 comments on commit 6dd50a2

Please sign in to comment.