diff options
author | Likai Ding <likaid@codeaurora.org> | 2014-03-17 17:04:30 +0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2014-12-15 14:48:35 -0800 |
commit | 518e890792416c58be868f1fd0c5c9aa2289fc0c (patch) | |
tree | 1cbe04ae1f56d23d814d57f660a96573da926cd3 | |
parent | 60be86381885dd7261bb9cc8389a716baa9ae727 (diff) | |
download | android_packages_apps_Gallery2-518e890792416c58be868f1fd0c5c9aa2289fc0c.tar.gz android_packages_apps_Gallery2-518e890792416c58be868f1fd0c5c9aa2289fc0c.tar.bz2 android_packages_apps_Gallery2-518e890792416c58be868f1fd0c5c9aa2289fc0c.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-x | src/com/android/gallery3d/app/TimeBar.java | 1 |
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 c07500e4f..1d08989aa 100755 --- a/src/com/android/gallery3d/app/TimeBar.java +++ b/src/com/android/gallery3d/app/TimeBar.java @@ -116,6 +116,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); |