From 59132ccf6d5db208c92ab54da2cad7d48190d177 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Mon, 30 Nov 2020 11:55:18 +0200 Subject: [PATCH] Fix --- .../bottomsheets/ElevationDateBottomSheet.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ElevationDateBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ElevationDateBottomSheet.java index b805442e50..10f8c283f9 100644 --- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ElevationDateBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/ElevationDateBottomSheet.java @@ -219,14 +219,12 @@ public class ElevationDateBottomSheet extends MenuBottomSheetDialogFragment { private void enableDisableReliefButtons(boolean enable) { for (BaseBottomSheetItem item : reliefFactorButtons) { - item.getView().setEnabled(enable); - TextView titleField = (TextView) item.getView().findViewById(R.id.title); - if (enable) { - titleField.setTextColor(checkedColor); - } else { - titleField.setTextColor(uncheckedColor); - } - item.getView().findViewById(R.id.compound_button).setEnabled(enable); + View view = item.getView(); + view.setEnabled(enable); + view.findViewById(R.id.compound_button).setEnabled(enable); + + TextView titleField = view.findViewById(R.id.title); + titleField.setTextColor(enable ? checkedColor : uncheckedColor); } }