summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@android.com>2014-03-11 00:06:40 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-03-11 00:06:40 +0000
commit6d71e165ba961251f0705b75aafed74eba1bc570 (patch)
tree12cdf08e1c72ded94edd5cbc26fe6b3ae031f062
parenta41ddccdc67ace7c9363efebbf6e51710928ce12 (diff)
parent3b2272cb2372933f22d769be4c885a176e4ef542 (diff)
downloadframeworks_base-6d71e165ba961251f0705b75aafed74eba1bc570.zip
frameworks_base-6d71e165ba961251f0705b75aafed74eba1bc570.tar.gz
frameworks_base-6d71e165ba961251f0705b75aafed74eba1bc570.tar.bz2
Merge "Round off when calculate next step in Seekbar"
-rw-r--r--core/java/android/widget/AbsSeekBar.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/AbsSeekBar.java b/core/java/android/widget/AbsSeekBar.java
index 7674837..fe2fc96 100644
--- a/core/java/android/widget/AbsSeekBar.java
+++ b/core/java/android/widget/AbsSeekBar.java
@@ -292,7 +292,7 @@ public abstract class AbsSeekBar extends ProgressBar {
// The extra space for the thumb to move on the track
available += mThumbOffset * 2;
- int thumbPos = (int) (scale * available);
+ int thumbPos = (int) (scale * available + 0.5f);
int topBound, bottomBound;
if (gap == Integer.MIN_VALUE) {