Merge "Fix SeekBar when in RTL layout direction" into jb-mr1-dev

This commit is contained in:
Fabrice Di Meglio
2012-09-12 13:27:31 -07:00
committed by Android (Google) Code Review

View File

@@ -304,7 +304,8 @@ public abstract class AbsSeekBar extends ProgressBar {
}
// Canvas will be translated, so 0,0 is where we start drawing
thumb.setBounds(thumbPos, topBound, thumbPos + thumbWidth, bottomBound);
final int left = isLayoutRtl() ? available - thumbPos : thumbPos;
thumb.setBounds(left, topBound, left + thumbWidth, bottomBound);
}
@Override