Skip to content

Commit

Permalink
[Slider] Changed slider to support very small widths
Browse files Browse the repository at this point in the history
Resolves #1243

PiperOrigin-RevId: 316741418
  • Loading branch information
ymarian authored and melaniegoetz committed Jun 18, 2020
1 parent 3379c45 commit ba9c2e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
// Update the visible track width.
trackWidth = w - trackSidePadding * 2;
trackWidth = Math.max(w - trackSidePadding * 2, 0);

// Update the visible tick coordinates.
if (stepSize > 0.0f) {
Expand Down

0 comments on commit ba9c2e6

Please sign in to comment.