diff options
Diffstat (limited to 'src/com/android/gallery3d/app/ManageCachePage.java')
-rw-r--r-- | src/com/android/gallery3d/app/ManageCachePage.java | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/app/ManageCachePage.java b/src/com/android/gallery3d/app/ManageCachePage.java index 7e301f28c..01efaea5e 100644 --- a/src/com/android/gallery3d/app/ManageCachePage.java +++ b/src/com/android/gallery3d/app/ManageCachePage.java @@ -113,10 +113,10 @@ public class ManageCachePage extends ActivityState implements int slotViewTop = GalleryActionBar.getHeight(activity); int slotViewBottom = bottom - top; - View cacheBar = activity.findViewById(R.id.cache_bar); - if (cacheBar != null) { + View footer = activity.findViewById(R.id.footer); + if (footer != null) { int location[] = {0, 0}; - cacheBar.getLocationOnScreen(location); + footer.getLocationOnScreen(location); slotViewBottom = location[1]; } @@ -143,6 +143,18 @@ public class ManageCachePage extends ActivityState implements mRootPane.invalidate(); } + private void onDown(int index) { + MediaSet set = mAlbumSetDataAdapter.getMediaSet(index); + Path path = (set == null) ? null : set.getPath(); + mSelectionManager.setPressedPath(path); + mAlbumSetView.invalidate(); + } + + private void onUp() { + mSelectionManager.setPressedPath(null); + mAlbumSetView.invalidate(); + } + public void onSingleTapUp(int slotIndex) { MediaSet targetSet = mAlbumSetDataAdapter.getMediaSet(slotIndex); if (targetSet == null) return; // Content is dirty, we shall reload soon @@ -286,6 +298,16 @@ public class ManageCachePage extends ActivityState implements config.slotViewSpec, config.labelSpec); mAlbumSetView.setListener(new SlotView.SimpleListener() { @Override + public void onDown(int index) { + ManageCachePage.this.onDown(index); + } + + @Override + public void onUp() { + ManageCachePage.this.onUp(); + } + + @Override public void onSingleTapUp(int slotIndex) { ManageCachePage.this.onSingleTapUp(slotIndex); } |