mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
[android] Use M3 theme on round FAB
Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
committed by
jeanbaptisteC
parent
18cd10ceed
commit
b49b19f34d
@@ -3,7 +3,7 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/map_buttons_bottom"
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/btn_bookmarks"
|
android:id="@+id/btn_bookmarks"
|
||||||
style="@style/MwmWidget.MapButton"
|
android:tint="?iconTint"
|
||||||
|
style="@style/MwmWidget.M3.FAB.MapButton"
|
||||||
android:contentDescription="@string/bookmarks"
|
android:contentDescription="@string/bookmarks"
|
||||||
app:srcCompat="@drawable/ic_bookmarks" />
|
app:srcCompat="@drawable/ic_bookmarks"
|
||||||
|
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton" />
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
style="@style/MwmWidget.MapButton.Bottom"
|
style="@style/MwmWidget.M3.FAB.MapButton.Bottom"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/my_position"
|
android:id="@+id/my_position"
|
||||||
style="@style/MwmWidget.MapButton"
|
android:tint="?iconTint"
|
||||||
android:contentDescription="@string/core_my_position" />
|
style="@style/MwmWidget.M3.FAB.MapButton"
|
||||||
|
android:contentDescription="@string/core_my_position"
|
||||||
|
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton" />
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/btn_search"
|
android:id="@+id/btn_search"
|
||||||
style="@style/MwmWidget.MapButton"
|
android:tint="?iconTint"
|
||||||
|
style="@style/MwmWidget.M3.FAB.MapButton"
|
||||||
android:contentDescription="@string/search"
|
android:contentDescription="@string/search"
|
||||||
app:srcCompat="@drawable/ic_search" />
|
app:srcCompat="@drawable/ic_search"
|
||||||
|
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton" />
|
||||||
|
|||||||
@@ -8,13 +8,17 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/nav_zoom_in"
|
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:srcCompat="@drawable/ic_plus"
|
||||||
|
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
android:layout_marginBottom="@dimen/margin_half"
|
android:layout_marginBottom="@dimen/margin_half"
|
||||||
android:contentDescription="@string/zoom_in"/>
|
android:contentDescription="@string/zoom_in"/>
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/nav_zoom_out"
|
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:srcCompat="@drawable/ic_minus"
|
||||||
|
app:shapeAppearance="@style/Widget.MaterialComponents.FloatingActionButton"
|
||||||
android:contentDescription="@string/zoom_out"/>
|
android:contentDescription="@string/zoom_out"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -432,4 +432,13 @@
|
|||||||
<style name="MwmWidget.M3.FAB.MapButton.Square">
|
<style name="MwmWidget.M3.FAB.MapButton.Square">
|
||||||
<item name="backgroundTint">?menuBackground</item>
|
<item name="backgroundTint">?menuBackground</item>
|
||||||
</style>
|
</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>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user