summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-08-13 13:30:02 -0700
committerBobby Georgescu <georgescu@google.com>2012-08-13 13:30:02 -0700
commitbb99150a872a7265e44ae5bd9eb3ce3534ac12b3 (patch)
treebe84419f4a62b01d33dcfb1651aa96c7b5ab3262 /src/com/android/gallery3d/ui
parentde8079dab0123ea087c3c9adbcf1c476bcf79a42 (diff)
downloadandroid_packages_apps_Snap-bb99150a872a7265e44ae5bd9eb3ce3534ac12b3.tar.gz
android_packages_apps_Snap-bb99150a872a7265e44ae5bd9eb3ce3534ac12b3.tar.bz2
android_packages_apps_Snap-bb99150a872a7265e44ae5bd9eb3ce3534ac12b3.zip
Show album counts in Gallery & other small reskin fixes
Bug: 6975144 Change-Id: I2f12c6482cc009aecbca3e26482ebd8944f01bb8
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r--src/com/android/gallery3d/ui/AlbumLabelMaker.java17
-rw-r--r--src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java1
2 files changed, 10 insertions, 8 deletions
diff --git a/src/com/android/gallery3d/ui/AlbumLabelMaker.java b/src/com/android/gallery3d/ui/AlbumLabelMaker.java
index a689e6990..4a1d545b7 100644
--- a/src/com/android/gallery3d/ui/AlbumLabelMaker.java
+++ b/src/com/android/gallery3d/ui/AlbumLabelMaker.java
@@ -181,17 +181,18 @@ public class AlbumLabelMaker {
// draw title
if (jc.isCancelled()) return null;
int x = s.leftMargin + s.iconSize;
- int y = s.titleOffset;
- drawText(canvas, x, y, title, labelWidth - s.leftMargin, mTitlePaint);
+ // 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 -
+ s.titleRightMargin, mTitlePaint);
- // TODO: draw the count once visual designers finalize where
- /*
+ // draw count
if (jc.isCancelled()) return null;
- if (icon != null) x = s.iconSize;
- y += s.titleFontSize + s.countOffset;
+ x = labelWidth - s.titleRightMargin;
+ y = (s.labelBackgroundHeight - s.countFontSize) / 2;
drawText(canvas, x, y, count,
- labelWidth - s.leftMargin - s.iconSize, mCountPaint);
- */
+ labelWidth - x , mCountPaint);
// draw the icon
if (icon != null) {
diff --git a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java
index f58c033b0..cee36d969 100644
--- a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java
+++ b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java
@@ -51,6 +51,7 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer {
public int countFontSize;
public int leftMargin;
public int iconSize;
+ public int titleRightMargin;
}
public AlbumSetSlotRenderer(GalleryActivity activity, SelectionManager selectionManager,