Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions lib/java/com/google/android/material/slider/BaseSlider.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.DimenRes;
import androidx.annotation.Dimension;
import androidx.annotation.DrawableRes;
import androidx.annotation.IntDef;
import androidx.annotation.IntRange;
Expand All @@ -103,6 +102,7 @@
import com.google.android.material.internal.ThemeEnforcement;
import com.google.android.material.internal.ViewUtils;
import com.google.android.material.motion.MotionUtils;
import com.google.android.material.resources.MaterialAttributes;
import com.google.android.material.resources.MaterialResources;
import com.google.android.material.shape.MaterialShapeDrawable;
import com.google.android.material.shape.ShapeAppearanceModel;
Expand Down Expand Up @@ -294,9 +294,6 @@ abstract class BaseSlider<
private static final float RIGHT_LABEL_PIVOT_X = -0.2f;
private static final float RIGHT_LABEL_PIVOT_Y = 0.5f;

@Dimension(unit = Dimension.DP)
private static final int MIN_TOUCH_TARGET_DP = 48;

@NonNull private final Paint inactiveTrackPaint;
@NonNull private final Paint activeTrackPaint;
@NonNull private final Paint thumbPaint;
Expand Down Expand Up @@ -547,8 +544,7 @@ private void processAttributes(Context context, AttributeSet attrs, int defStyle
setCentered(a.getBoolean(R.styleable.Slider_centered, false));
stepSize = a.getFloat(R.styleable.Slider_android_stepSize, 0.0f);

float defaultMinTouchTargetSize =
(float) Math.ceil(ViewUtils.dpToPx(getContext(), MIN_TOUCH_TARGET_DP));
float defaultMinTouchTargetSize = MaterialAttributes.resolveMinimumAccessibleTouchTarget(context);
minTouchTargetSize =
(int)
Math.ceil(
Expand Down