From 94251387824e9ee9cfb321e50c858e9e12d00ebb Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Date: Sat, 23 Aug 2025 10:46:32 +0200 Subject: [PATCH] [android] Migrate Manage route and save buttons to Material Components Signed-off-by: jeanbaptisteC --- .../routing/RoutingBottomMenuController.java | 8 +++++--- .../main/res/layout-land/altitude_chart_panel.xml | 14 +++++++++----- .../layout-w1020dp-land/altitude_chart_panel.xml | 14 +++++++++----- .../src/main/res/layout/altitude_chart_panel.xml | 15 ++++++++++----- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java b/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java index 6ff7b45bf..a9de92638 100644 --- a/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java +++ b/android/app/src/main/java/app/organicmaps/routing/RoutingBottomMenuController.java @@ -45,6 +45,8 @@ import app.organicmaps.util.UiUtils; import app.organicmaps.util.Utils; import app.organicmaps.widget.recycler.DotDividerItemDecoration; import app.organicmaps.widget.recycler.MultilineLayoutManager; + +import com.google.android.material.button.MaterialButton; import com.google.android.material.imageview.ShapeableImageView; import com.google.android.material.textview.MaterialTextView; import java.util.LinkedList; @@ -153,10 +155,10 @@ final class RoutingBottomMenuController implements View.OnClickListener mTransitViewDecorator = new DotDividerItemDecoration(dividerDrawable, res.getDimensionPixelSize(R.dimen.margin_base), res.getDimensionPixelSize(R.dimen.margin_half)); - Button manageRouteButton = altitudeChartFrame.findViewById(R.id.btn__manage_route); + MaterialButton manageRouteButton = altitudeChartFrame.findViewById(R.id.btn__manage_route); manageRouteButton.setOnClickListener(this); - Button saveButton = altitudeChartFrame.findViewById(R.id.btn__save); + MaterialButton saveButton = altitudeChartFrame.findViewById(R.id.btn__save); saveButton.setOnClickListener(this); } @@ -168,7 +170,7 @@ final class RoutingBottomMenuController implements View.OnClickListener showRouteAltitudeChart(); showRoutingDetails(); UiUtils.show(mAltitudeChartFrame); - Button saveButton = mAltitudeChartFrame.findViewById(R.id.btn__save); + MaterialButton saveButton = mAltitudeChartFrame.findViewById(R.id.btn__save); saveButton.setText(R.string.save); saveButton.setEnabled(true); } diff --git a/android/app/src/main/res/layout-land/altitude_chart_panel.xml b/android/app/src/main/res/layout-land/altitude_chart_panel.xml index f5fcb7822..4938d5ea3 100644 --- a/android/app/src/main/res/layout-land/altitude_chart_panel.xml +++ b/android/app/src/main/res/layout-land/altitude_chart_panel.xml @@ -3,6 +3,7 @@ -