From d1913702fe8ea6fe5f2ed37aeeff1f512b7648d8 Mon Sep 17 00:00:00 2001 From: Johan von Forstner Date: Sun, 5 Apr 2020 19:04:26 +0200 Subject: [PATCH] fix position of toolbar --- app/build.gradle | 2 +- app/src/main/res/layout/activity_maps.xml | 1 + app/src/main/res/layout/fragment_map.xml | 47 +++++++++++++---------- app/src/main/res/values/colors.xml | 1 + 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index df4b8ca3..a9929bf1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'com.google.maps.android:android-maps-utils:0.5' - implementation 'com.github.johan12345:CustomBottomSheetBehavior:efe0127962' + implementation 'com.github.johan12345:CustomBottomSheetBehavior:4e43539e' implementation 'com.google.android.gms:play-services-maps:17.0.0' implementation 'com.google.android.gms:play-services-location:17.0.0' implementation 'com.squareup.retrofit2:retrofit:2.7.2' diff --git a/app/src/main/res/layout/activity_maps.xml b/app/src/main/res/layout/activity_maps.xml index 05821369..9ab7251b 100644 --- a/app/src/main/res/layout/activity_maps.xml +++ b/app/src/main/res/layout/activity_maps.xml @@ -10,6 +10,7 @@ android:name="androidx.navigation.fragment.NavHostFragment" android:layout_height="match_parent" android:layout_width="match_parent" + android:fitsSystemWindows="true" app:defaultNavHost="true" app:navGraph="@navigation/nav_graph" /> diff --git a/app/src/main/res/layout/fragment_map.xml b/app/src/main/res/layout/fragment_map.xml index 425ef466..dce9bd29 100644 --- a/app/src/main/res/layout/fragment_map.xml +++ b/app/src/main/res/layout/fragment_map.xml @@ -15,43 +15,48 @@ + android:layout_height="match_parent"> - + android:fitsSystemWindows="true" + app:layout_behavior="@string/ScrollingAppBarLayoutBehavior"> - + android:layout_height="wrap_content" + android:layout_margin="8dp" + android:elevation="8dp" + android:background="@drawable/rounded_rect_4dp" + android:backgroundTint="?android:colorBackground"> - + android:layout_height="48dp"> - + - + + + + + #9e9e9e #4caf50 #f44336 + #C3000000