diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-06 19:12:20 -0700 |
---|---|---|
committer | Bobby Georgescu <georgescu@google.com> | 2012-10-06 19:12:20 -0700 |
commit | b484a205122769220709a4783d563a2022f5ccf5 (patch) | |
tree | 0fcb177a3fe178ae6343b5a50718eb603f142c28 /src/com/android/gallery3d/ui | |
parent | 86bc3a20a94d744e44a53bc5b277dbb5cbca0073 (diff) | |
download | android_packages_apps_Snap-b484a205122769220709a4783d563a2022f5ccf5.tar.gz android_packages_apps_Snap-b484a205122769220709a4783d563a2022f5ccf5.tar.bz2 android_packages_apps_Snap-b484a205122769220709a4783d563a2022f5ccf5.zip |
Implement new grid layout in Gallery
Bug: 7300836
Change-Id: Iab2b4f1caa52c5aa7638983fec194b3f81cc4c31
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r-- | src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java index f2b576f5f..5c246e8e3 100644 --- a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java +++ b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java @@ -16,6 +16,7 @@ package com.android.gallery3d.ui; +import com.android.gallery3d.R; import com.android.gallery3d.app.AbstractGalleryActivity; import com.android.gallery3d.app.AlbumSetDataLoader; import com.android.gallery3d.data.MediaObject; @@ -29,6 +30,7 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer { private final int mPlaceholderColor; private final ColorTexture mWaitLoadingTexture; + private final ResourceTexture mCameraOverlay; private final AbstractGalleryActivity mActivity; private final SelectionManager mSelectionManager; protected final LabelSpec mLabelSpec; @@ -68,6 +70,8 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer { mWaitLoadingTexture = new ColorTexture(mPlaceholderColor); mWaitLoadingTexture.setSize(1, 1); + mCameraOverlay = new ResourceTexture(activity, + R.drawable.frame_overlay_gallery_camera); } public void setPressedIndex(int index) { @@ -122,6 +126,12 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer { protected int renderOverlay( GLCanvas canvas, int index, AlbumSetEntry entry, int width, int height) { int renderRequestFlags = 0; + if (entry.album != null && entry.album.isCameraRoll()) { + int minDim = Math.min(width, height); + int dim = minDim / 2; + int pos = (minDim - dim) / 2; + mCameraOverlay.draw(canvas, pos, pos, dim, dim); + } if (mPressedIndex == index) { if (mAnimatePressedUp) { drawPressedUpFrame(canvas, width, height); |