Skip to content

Commit

Permalink
Fix toolbar being hidden by status bar in list and detail screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyTangAndroid committed Jan 2, 2021
1 parent cbcfaf5 commit 38327ee
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 3 additions & 1 deletion wood/src/main/res/layout/wood_activity_leaf_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".LeafDetailsActivity">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/wood_details_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorPrimary"
android:paddingTop="@dimen/wood_status_bar_padding"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<androidx.appcompat.widget.Toolbar
Expand All @@ -22,6 +23,7 @@
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</com.google.android.material.appbar.AppBarLayout>


<FrameLayout
android:id="@+id/fl_fragment_holder"
android:layout_width="match_parent"
Expand Down
11 changes: 6 additions & 5 deletions wood/src/main/res/layout/wood_activity_leaf_list.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:fitsSystemWindows="true"
tools:context=".LeafListActivity">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/wood_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/wood_status_bar_padding"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

<androidx.appcompat.widget.Toolbar
Expand All @@ -27,6 +27,7 @@
android:id="@+id/wood_fragment"
android:name="com.tonytangandroid.wood.LeavesCollectionFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

</LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
4 changes: 0 additions & 4 deletions wood/src/main/res/values-v19/dimens.xml

This file was deleted.

1 change: 0 additions & 1 deletion wood/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="wood_status_bar_padding">0dp</dimen>
<dimen name="wood_search_bar_height">48dp</dimen>
<!--<dimen name="wood_navigation_bar_padding">0dp</dimen>-->
</resources>

0 comments on commit 38327ee

Please sign in to comment.