Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 518e8907 authored by Likai Ding's avatar Likai Ding Committed by cretin45
Browse files

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
parent 60be8638
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);