Merge "Ensure a11y ids for LabeledSeekBar are in bounds" into oc-mr1-dev
This commit is contained in:
@@ -201,6 +201,7 @@ public class LabeledSeekBar extends SeekBar {
|
|||||||
int posBase = Math.max(0,
|
int posBase = Math.max(0,
|
||||||
((int) x - LabeledSeekBar.this.getPaddingStart()) / getHalfVirtualViewWidth());
|
((int) x - LabeledSeekBar.this.getPaddingStart()) / getHalfVirtualViewWidth());
|
||||||
posBase = (posBase + 1) / 2;
|
posBase = (posBase + 1) / 2;
|
||||||
|
posBase = Math.min(posBase, LabeledSeekBar.this.getMax());
|
||||||
return mIsLayoutRtl ? LabeledSeekBar.this.getMax() - posBase : posBase;
|
return mIsLayoutRtl ? LabeledSeekBar.this.getMax() - posBase : posBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user