summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-08-13 14:27:08 -0700
committerBobby Georgescu <georgescu@google.com>2012-08-14 11:47:16 -0700
commitf17dbdf94fb5534266336f99bdd8014ace672ea7 (patch)
tree7fbd06e834030b3bcb6e7f98dd04573ef8c60ad4
parentbb99150a872a7265e44ae5bd9eb3ce3534ac12b3 (diff)
downloadandroid_packages_apps_Snap-f17dbdf94fb5534266336f99bdd8014ace672ea7.tar.gz
android_packages_apps_Snap-f17dbdf94fb5534266336f99bdd8014ace672ea7.tar.bz2
android_packages_apps_Snap-f17dbdf94fb5534266336f99bdd8014ace672ea7.zip
Gallery reskin: album list spacing, action bar theme
Change-Id: Ic556f22bd25c57ddd0b659a7f43a7a1afbdcb8df
-rw-r--r--src/com/android/gallery3d/app/AlbumSetPage.java11
-rw-r--r--src/com/android/gallery3d/app/Config.java5
2 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/app/AlbumSetPage.java b/src/com/android/gallery3d/app/AlbumSetPage.java
index 1df073466..1c5e1f908 100644
--- a/src/com/android/gallery3d/app/AlbumSetPage.java
+++ b/src/com/android/gallery3d/app/AlbumSetPage.java
@@ -78,6 +78,7 @@ public class AlbumSetPage extends ActivityState implements
private boolean mIsActive = false;
private SlotView mSlotView;
private AlbumSetSlotRenderer mAlbumSetView;
+ private Config.AlbumSetPage mConfig;
private MediaSet mMediaSet;
private String mTitle;
@@ -124,8 +125,8 @@ public class AlbumSetPage extends ActivityState implements
boolean changed, int left, int top, int right, int bottom) {
mEyePosition.resetPosition();
- int slotViewTop = mActionBar.getHeight();
- int slotViewBottom = bottom - top;
+ int slotViewTop = mActionBar.getHeight() + mConfig.paddingTop;
+ int slotViewBottom = bottom - top - mConfig.paddingBottom;
int slotViewRight = right - left;
if (mShowDetails) {
@@ -368,10 +369,10 @@ public class AlbumSetPage extends ActivityState implements
mSelectionManager = new SelectionManager(mActivity, true);
mSelectionManager.setSelectionListener(this);
- Config.AlbumSetPage config = Config.AlbumSetPage.get((Context) mActivity);
- mSlotView = new SlotView(mActivity, config.slotViewSpec);
+ mConfig = Config.AlbumSetPage.get((Context) mActivity);
+ mSlotView = new SlotView(mActivity, mConfig.slotViewSpec);
mAlbumSetView = new AlbumSetSlotRenderer(
- mActivity, mSelectionManager, mSlotView, config.labelSpec);
+ mActivity, mSelectionManager, mSlotView, mConfig.labelSpec);
mSlotView.setSlotRenderer(mAlbumSetView);
mSlotView.setListener(new SlotView.SimpleListener() {
@Override
diff --git a/src/com/android/gallery3d/app/Config.java b/src/com/android/gallery3d/app/Config.java
index bd4aed1d5..6fb24ec81 100644
--- a/src/com/android/gallery3d/app/Config.java
+++ b/src/com/android/gallery3d/app/Config.java
@@ -29,6 +29,8 @@ final class Config {
public SlotView.Spec slotViewSpec;
public AlbumSetSlotRenderer.LabelSpec labelSpec;
+ public int paddingTop;
+ public int paddingBottom;
public static synchronized AlbumSetPage get(Context context) {
if (sInstance == null) {
@@ -45,6 +47,9 @@ final class Config {
slotViewSpec.rowsPort = r.getInteger(R.integer.albumset_rows_port);
slotViewSpec.slotGap = r.getDimensionPixelSize(R.dimen.albumset_slot_gap);
+ paddingTop = r.getDimensionPixelSize(R.dimen.albumset_padding_top);
+ paddingBottom = r.getDimensionPixelSize(R.dimen.albumset_padding_bottom);
+
labelSpec = new AlbumSetSlotRenderer.LabelSpec();
labelSpec.labelBackgroundHeight = r.getDimensionPixelSize(
R.dimen.albumset_label_background_height);