summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2014-03-17 17:04:30 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:19 -0700
commit67a88f5e57f367a0e1a5741f8a5513e0a5048749 (patch)
tree435eda62537e837e4fb3700a12f362d6ce9027b8
parent85df641512d37c0af9609b8c347a863f274b8381 (diff)
downloadandroid_packages_apps_Gallery2-67a88f5e57f367a0e1a5741f8a5513e0a5048749.tar.gz
android_packages_apps_Gallery2-67a88f5e57f367a0e1a5741f8a5513e0a5048749.tar.bz2
android_packages_apps_Gallery2-67a88f5e57f367a0e1a5741f8a5513e0a5048749.zip
Gallery2: fix time text display issue
In TrimTimeBar, mTimeBounds may never get updated, which causes time text to be out of screen. Give mTimeBounds a reasonable intial value to prevent this. Change-Id: Ie0378acde5b856340ac0dccdc0a688438b7827e0 CRs-Fixed: 627787
-rwxr-xr-xsrc/com/android/gallery3d/app/TimeBar.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/TimeBar.java b/src/com/android/gallery3d/app/TimeBar.java
index 1b9ac24ed..7748e6c2d 100755
--- a/src/com/android/gallery3d/app/TimeBar.java
+++ b/src/com/android/gallery3d/app/TimeBar.java
@@ -113,6 +113,7 @@ public class TimeBar extends View {
mTimeTextPaint.setTextAlign(Paint.Align.CENTER);
mTimeBounds = new Rect();
+ mTimeTextPaint.getTextBounds("0:00:00", 0, 7, mTimeBounds);
mScrubber = BitmapFactory.decodeResource(getResources(), R.drawable.scrubber_knob);
mScrubberPadding = (int) (metrics.density * SCRUBBER_PADDING_IN_DP);