summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/TimeBar.java
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-09-24 16:36:36 -0700
committerTeng-Hui Zhu <ztenghui@google.com>2012-09-26 13:26:24 -0700
commita33d4f6662b26fcdcc4e92de168260a85631e9b5 (patch)
treeca8061611e2f0355e8fc1dda0394eb0a4b7f37d3 /src/com/android/gallery3d/app/TimeBar.java
parent561df21b1651cf6b266f241bb1a3945c05c229bf (diff)
downloadandroid_packages_apps_Snap-a33d4f6662b26fcdcc4e92de168260a85631e9b5.tar.gz
android_packages_apps_Snap-a33d4f6662b26fcdcc4e92de168260a85631e9b5.tar.bz2
android_packages_apps_Snap-a33d4f6662b26fcdcc4e92de168260a85631e9b5.zip
Trimming: switch to use selectors.
Switch into using 2 selectors for the starting and end point of triming. Shift the bar up a bit to accommandate the selectors. bug:7093240 Change-Id: If3b6fe285cd69756ecbfe1d52efd90b499150c72
Diffstat (limited to 'src/com/android/gallery3d/app/TimeBar.java')
-rw-r--r--src/com/android/gallery3d/app/TimeBar.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/app/TimeBar.java b/src/com/android/gallery3d/app/TimeBar.java
index b7ffbb0de..402dfcfab 100644
--- a/src/com/android/gallery3d/app/TimeBar.java
+++ b/src/com/android/gallery3d/app/TimeBar.java
@@ -57,9 +57,9 @@ public class TimeBar extends View {
protected final Rect mProgressBar;
protected final Rect mPlayedBar;
- private final Paint mProgressPaint;
- private final Paint mPlayedPaint;
- private final Paint mTimeTextPaint;
+ protected final Paint mProgressPaint;
+ protected final Paint mPlayedPaint;
+ protected final Paint mTimeTextPaint;
protected final Bitmap mScrubber;
protected int mScrubberPadding; // adds some touch tolerance around the
@@ -157,14 +157,14 @@ public class TimeBar extends View {
&& mScrubberTop - mScrubberPadding < y && y < scrubberBottom + mScrubberPadding;
}
- protected void clampScrubber() {
+ private void clampScrubber() {
int half = mScrubber.getWidth() / 2;
int max = mProgressBar.right - half;
int min = mProgressBar.left - half;
mScrubberLeft = Math.min(max, Math.max(min, mScrubberLeft));
}
- protected int getScrubberTime() {
+ private int getScrubberTime() {
return (int) ((long) (mScrubberLeft + mScrubber.getWidth() / 2 - mProgressBar.left)
* mTotalTime / mProgressBar.width());
}