[android] Use FAB instead save button at the top

Signed-off-by: Jean-Baptiste <jeanbaptiste.charron@outlook.fr>
This commit is contained in:
Jean-Baptiste
2025-09-13 09:25:29 +02:00
committed by jeanbaptisteC
parent cc8f45bac9
commit d1643d695e
4 changed files with 35 additions and 59 deletions

View File

@@ -11,7 +11,14 @@
style="@style/MwmWidget.ToolbarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/MwmWidget.ToolbarTheme"/>
android:theme="@style/MwmWidget.ToolbarTheme">
<com.google.android.material.imageview.ShapeableImageView
android:layout_width="?actionBarSize"
android:layout_height="?actionBarSize"
android:scaleType="centerInside"
android:layout_gravity="end|center_vertical"
app:srcCompat="@drawable/ic_done"/>
</com.google.android.material.appbar.MaterialToolbar>
<androidx.core.widget.NestedScrollView
android:scrollbars="none"
android:fillViewport="true"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@@ -12,42 +12,36 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end|center_vertical"
android:theme="@style/MwmWidget.ToolbarTheme">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="@dimen/margin_half">
android:theme="@style/MwmWidget.ToolbarTheme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/editor_add_select_location"
android:textAppearance="@style/MwmTextAppearance.Toolbar.Title"/>
<com.google.android.material.imageview.ShapeableImageView
app:tint="@color/image_view"
android:id="@+id/done"
app:srcCompat="@drawable/ic_done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:layout_gravity="end"
android:scaleType="centerInside"
android:contentDescription="@string/done" />
</LinearLayout>
</com.google.android.material.appbar.MaterialToolbar>
android:padding="@dimen/margin_half"
android:text="@string/editor_add_select_location"
android:textAppearance="@style/MwmTextAppearance.Toolbar.Title"/>
</com.google.android.material.appbar.MaterialToolbar>
<com.google.android.material.textview.MaterialTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?panel"
android:padding="@dimen/margin_base"
android:text="@string/editor_focus_map_on_location"/>
android:text="@string/editor_focus_map_on_location"
app:layout_constraintTop_toBottomOf="@+id/toolbar_point_chooser" />
</LinearLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/done"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:contentDescription="@string/save"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_done" />
</androidx.constraintlayout.widget.ConstraintLayout>