fix position of toolbar

This commit is contained in:
Johan von Forstner
2020-04-05 19:04:26 +02:00
parent 248f8ffa6b
commit d1913702fe
4 changed files with 29 additions and 22 deletions

View File

@@ -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'

View File

@@ -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" />

View File

@@ -15,43 +15,48 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false">
android:layout_height="match_parent">
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".MapsActivity" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/toolbar_container"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:elevation="8dp"
app:layout_behavior="@string/ScrollingAppBarLayoutBehavior"
android:background="@drawable/rounded_rect_4dp"
android:backgroundTint="?android:colorBackground">
android:fitsSystemWindows="true"
app:layout_behavior="@string/ScrollingAppBarLayoutBehavior">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="48dp">
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:elevation="8dp"
android:background="@drawable/rounded_rect_4dp"
android:backgroundTint="?android:colorBackground">
<TextView
android:id="@+id/search"
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/search"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
android:textColor="?android:textColorSecondary" />
android:layout_height="48dp">
</androidx.appcompat.widget.Toolbar>
<TextView
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/search"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
android:textColor="?android:textColorSecondary" />
</com.google.android.material.appbar.AppBarLayout>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
</FrameLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/gallery"

View File

@@ -11,4 +11,5 @@
<color name="charger_low">#9e9e9e</color>
<color name="available">#4caf50</color>
<color name="unavailable">#f44336</color>
<color name="status_bar_scrim">#C3000000</color>
</resources>