From b94be6c3448622b876abe84234eef3fa0e044a3e Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 16 Sep 2020 18:03:57 +0300 Subject: [PATCH] Update material library --- OsmAnd/build.gradle | 2 +- OsmAnd/src/net/osmand/plus/UiUtilities.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index e33b1ca75f..80c70c84b4 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -524,7 +524,7 @@ dependencies { implementation 'androidx.gridlayout:gridlayout:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'com.google.android.material:material:1.2.0-beta01' + implementation 'com.google.android.material:material:1.2.1' implementation 'androidx.browser:browser:1.0.0' implementation 'androidx.preference:preference:1.1.0' implementation fileTree(include: ['gnu-trove-osmand.jar', 'icu4j-49_1_patched.jar'], dir: 'libs') diff --git a/OsmAnd/src/net/osmand/plus/UiUtilities.java b/OsmAnd/src/net/osmand/plus/UiUtilities.java index 8dc59eccc9..a435bd975e 100644 --- a/OsmAnd/src/net/osmand/plus/UiUtilities.java +++ b/OsmAnd/src/net/osmand/plus/UiUtilities.java @@ -42,6 +42,7 @@ import androidx.core.graphics.drawable.DrawableCompat; import androidx.core.view.ViewCompat; import androidx.core.widget.TintableCompoundButton; +import com.google.android.material.slider.LabelFormatter; import com.google.android.material.slider.RangeSlider; import com.google.android.material.slider.Slider; import com.google.android.material.snackbar.BaseTransientBottomBar; @@ -610,7 +611,7 @@ public class UiUtilities { slider.setTrackHeight(ctx.getResources().getDimensionPixelSize(R.dimen.slider_track_height)); // label behavior - slider.setLabelBehavior(Slider.LABEL_GONE); + slider.setLabelBehavior(LabelFormatter.LABEL_GONE); } public static void setupSlider(RangeSlider slider, boolean nightMode, @@ -650,7 +651,7 @@ public class UiUtilities { slider.setTrackHeight(ctx.getResources().getDimensionPixelSize(R.dimen.slider_track_height)); // label behavior - slider.setLabelBehavior(Slider.LABEL_GONE); + slider.setLabelBehavior(LabelFormatter.LABEL_GONE); } public static void setupDialogButton(boolean nightMode, View buttonView, DialogButtonType buttonType, @StringRes int buttonTextId) {