[android] Use M3 theme on round FAB

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2025-09-20 17:01:31 +02:00
committed by jeanbaptisteC
parent 18cd10ceed
commit b49b19f34d
7 changed files with 30 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/map_buttons_bottom"
style="@style/MwmWidget.MapButton.Bottom"
style="@style/MwmWidget.M3.FAB.MapButton.Bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipChildren="false"

View File

@@ -3,6 +3,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/btn_bookmarks"
style="@style/MwmWidget.MapButton"
android:tint="?iconTint"
style="@style/MwmWidget.M3.FAB.MapButton"
android:contentDescription="@string/bookmarks"
app:srcCompat="@drawable/ic_bookmarks" />
app:srcCompat="@drawable/ic_bookmarks"
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton" />

View File

@@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
style="@style/MwmWidget.MapButton.Bottom"
style="@style/MwmWidget.M3.FAB.MapButton.Bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.floatingactionbutton.FloatingActionButton
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/my_position"
style="@style/MwmWidget.MapButton"
android:contentDescription="@string/core_my_position" />
android:tint="?iconTint"
style="@style/MwmWidget.M3.FAB.MapButton"
android:contentDescription="@string/core_my_position"
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton" />

View File

@@ -3,6 +3,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/btn_search"
style="@style/MwmWidget.MapButton"
android:tint="?iconTint"
style="@style/MwmWidget.M3.FAB.MapButton"
android:contentDescription="@string/search"
app:srcCompat="@drawable/ic_search" />
app:srcCompat="@drawable/ic_search"
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton" />

View File

@@ -8,13 +8,17 @@
android:orientation="vertical">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/nav_zoom_in"
style="@style/MwmWidget.MapButton.Zoom"
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
android:tint="?iconTint"
app:srcCompat="@drawable/ic_plus"
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
android:layout_marginBottom="@dimen/margin_half"
android:contentDescription="@string/zoom_in"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/nav_zoom_out"
style="@style/MwmWidget.MapButton.Zoom"
style="@style/MwmWidget.M3.FAB.MapButton.Zoom"
android:tint="?iconTint"
app:srcCompat="@drawable/ic_minus"
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
android:contentDescription="@string/zoom_out"/>
</LinearLayout>

View File

@@ -432,4 +432,13 @@
<style name="MwmWidget.M3.FAB.MapButton.Square">
<item name="backgroundTint">?menuBackground</item>
</style>
<style name="MwmWidget.M3.FAB.MapButton.Zoom">
<item name="maxImageSize">34dp</item>
</style>
<style name="MwmWidget.M3.FAB.MapButton.Bottom">
<item name="android:maxWidth">@dimen/map_buttons_bottom_max_width</item>
<item name="android:padding">@dimen/nav_frame_padding</item>
</style>
</resources>