From ae2cae638b2abacd5e085b992fda79fb6a8f29d2 Mon Sep 17 00:00:00 2001 From: Nazar Date: Fri, 21 Feb 2020 11:07:55 +0200 Subject: [PATCH] Fix text color Measurement Tool -> "show on map after saving" --- OsmAnd/res/layout/save_gpx_dialog.xml | 4 +++- .../plus/measurementtool/MeasurementToolFragment.java | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/layout/save_gpx_dialog.xml b/OsmAnd/res/layout/save_gpx_dialog.xml index b7da430e2b..003c19ffdb 100644 --- a/OsmAnd/res/layout/save_gpx_dialog.xml +++ b/OsmAnd/res/layout/save_gpx_dialog.xml @@ -26,7 +26,7 @@ android:layout_marginStart="@dimen/bottom_sheet_content_margin" android:gravity="center_horizontal" android:text="@string/file_with_name_already_exists" - android:textColor="@color/marker_red" + android:textColor="@color/color_warning" android:visibility="invisible"/> @@ -58,6 +59,7 @@ android:layout_centerVertical="true" android:layout_toLeftOf="@id/toggle_row_toggle" android:layout_toStartOf="@id/toggle_row_toggle" + android:textColor="?android:textColorPrimary" android:text="@string/show_on_map_after_saving"/> diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index ea909bfb72..17b60ebf0e 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -1157,7 +1157,15 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { final View view = UiUtilities.getInflater(mapActivity, nightMode).inflate(R.layout.save_gpx_dialog, null); final EditText nameEt = (EditText) view.findViewById(R.id.gpx_name_et); final TextView warningTextView = (TextView) view.findViewById(R.id.file_exists_text_view); + final View buttonView = view.findViewById(R.id.button_view); final SwitchCompat showOnMapToggle = (SwitchCompat) view.findViewById(R.id.toggle_show_on_map); + UiUtilities.setupCompoundButton(showOnMapToggle, nightMode, UiUtilities.CompoundButtonType.GLOBAL); + buttonView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + showOnMapToggle.setChecked(!showOnMapToggle.isChecked()); + } + }); showOnMapToggle.setChecked(true); final String suggestedName = new SimpleDateFormat("yyyy-MM-dd_HH-mm_EEE", Locale.US).format(new Date());