Skip to content

Commit 2cd3566

Browse files
Fabrice Di MeglioAndroid (Google) Code Review
authored andcommitted
Merge "Fix SeekBar when in RTL layout direction" into jb-mr1-dev
2 parents 8872465 + 06849e8 commit 2cd3566

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/java/android/widget/AbsSeekBar.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ private void setThumbPos(int w, Drawable thumb, float scale, int gap) {
304304
}
305305

306306
// Canvas will be translated, so 0,0 is where we start drawing
307-
thumb.setBounds(thumbPos, topBound, thumbPos + thumbWidth, bottomBound);
307+
final int left = isLayoutRtl() ? available - thumbPos : thumbPos;
308+
thumb.setBounds(left, topBound, left + thumbWidth, bottomBound);
308309
}
309310

310311
@Override

0 commit comments

Comments
 (0)