Skip to content

Commit

Permalink
[Fix] Fix crash when total vertical padding is larger than view height (
Browse files Browse the repository at this point in the history
  • Loading branch information
h6ah4i committed Apr 26, 2022
1 parent 54ac05c commit 56bb28f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -189,7 +189,7 @@ private void onPreDraw() {
Rect padding = getPadding();
int trackLeft = isLayoutRtl ? padding.left : viewWidth - padding.right - mTrackWidth;
layoutView(mTrackView, trackLeft, padding.top, trackLeft + mTrackWidth,
viewHeight - padding.bottom);
Math.max(viewHeight - padding.bottom, padding.top));
int thumbLeft = isLayoutRtl ? padding.left : viewWidth - padding.right - mThumbWidth;
int thumbTop = padding.top + mThumbOffset;
layoutView(mThumbView, thumbLeft, thumbTop, thumbLeft + mThumbWidth,
Expand Down

0 comments on commit 56bb28f

Please sign in to comment.