diff options
| author | yongga <yongga@codeaurora.org> | 2016-01-12 16:26:50 +0800 |
|---|---|---|
| committer | yongga <yongga@codeaurora.org> | 2016-01-12 16:26:50 +0800 |
| commit | 8da9643300a564c3e54c525543d38ac8e8b7f2cc (patch) | |
| tree | 7e5660a88dad2b4af133be8218dfdc8fc8ac28f9 /src/com/android | |
| parent | 24af2c506c4b7ad200669cc951c43f664228eac9 (diff) | |
| download | android_packages_apps_Gallery2-8da9643300a564c3e54c525543d38ac8e8b7f2cc.tar.gz android_packages_apps_Gallery2-8da9643300a564c3e54c525543d38ac8e8b7f2cc.tar.bz2 android_packages_apps_Gallery2-8da9643300a564c3e54c525543d38ac8e8b7f2cc.zip | |
Gallery2: fix display abnormal on album page when in RTL mode.
Count text view of album label display abnormal because x position < 0.
Set correct x position.
Change-Id: Ibf017e1ffee3743b9a936ee91ed12f415c07ec89
CRs-Fixed: 953085
Diffstat (limited to 'src/com/android')
| -rw-r--r-- | src/com/android/gallery3d/ui/AlbumLabelMaker.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/com/android/gallery3d/ui/AlbumLabelMaker.java b/src/com/android/gallery3d/ui/AlbumLabelMaker.java index 20e4a2dea..0216ffd7f 100644 --- a/src/com/android/gallery3d/ui/AlbumLabelMaker.java +++ b/src/com/android/gallery3d/ui/AlbumLabelMaker.java @@ -216,18 +216,17 @@ public class AlbumLabelMaker { if (jc.isCancelled()) return null; int strLength = (int) mTitlePaint.measureText(title); if (!isAlbumListViewShown) { - int x = labelWidth - s.leftMargin - strLength; - // TODO: is the offset relevant in new reskin? - // int y = s.titleOffset; - int y = (s.labelBackgroundHeight - s.titleFontSize) / 2; - drawText(canvas, x, y, title, labelWidth - s.leftMargin - x, mTitlePaint); + int x = labelWidth - s.leftMargin - strLength; + // TODO: is the offset relevant in new reskin? + // int y = s.titleOffset; + int y = (s.labelBackgroundHeight - s.titleFontSize) / 2; + drawText(canvas, x, y, title, labelWidth - s.leftMargin - x, mTitlePaint); - // draw count - if (jc.isCancelled()) return null; - x = s.leftMargin + 10 - s.titleRightMargin;// plus 10 to get a much bigger margin - y = (s.labelBackgroundHeight - s.countFontSize) / 2; - drawText(canvas, x, y, count, - labelWidth - x, mCountPaint); + // draw count + if (jc.isCancelled()) return null; + x = s.leftMargin + 10;// plus 10 to get a much bigger margin + y = (s.labelBackgroundHeight - s.countFontSize) / 2; + drawText(canvas, x, y, count, labelWidth - x, mCountPaint); } else { int x = labelWidth - (s1.leftMargin + s1.iconSize) |
