diff options
author | Ray Chen <raychen@google.com> | 2012-03-06 17:24:28 +0800 |
---|---|---|
committer | Ray Chen <raychen@google.com> | 2012-03-15 08:50:35 +0800 |
commit | 84c220f10a643927c8a2126de8a755d8d7f7ec9e (patch) | |
tree | a21b376d0a735a852606d4fc55b55f2d4b6331a2 /src/com/android/gallery3d/app/GalleryActionBar.java | |
parent | e8589158f7a19c78f3b8c483d7f0d8e98b06ce88 (diff) | |
download | android_packages_apps_Gallery2-84c220f10a643927c8a2126de8a755d8d7f7ec9e.tar.gz android_packages_apps_Gallery2-84c220f10a643927c8a2126de8a755d8d7f7ec9e.tar.bz2 android_packages_apps_Gallery2-84c220f10a643927c8a2126de8a755d8d7f7ec9e.zip |
Fix 3462852 [UI] When linking from Camera preview - App icon with 'Up' arrow should go to next level up.
Some changes in this CL:
1. ActivityState can decide whether to enable home button and show up arrow
2. ActivityState can handle home_up event on its own
3. Support getContentUri in LocalAlbum (Image/Video Roll) and LocalMergeAlbum (Camera Roll)
4. Gallery supports view action for AlbumPage (Camera Roll)
Change-Id: I85a75cdce9cbc2a877651fdec34a0180ed8e785c
Diffstat (limited to 'src/com/android/gallery3d/app/GalleryActionBar.java')
-rw-r--r-- | src/com/android/gallery3d/app/GalleryActionBar.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/GalleryActionBar.java b/src/com/android/gallery3d/app/GalleryActionBar.java index 93b6e8b1e..35cb8b4cb 100644 --- a/src/com/android/gallery3d/app/GalleryActionBar.java +++ b/src/com/android/gallery3d/app/GalleryActionBar.java @@ -210,6 +210,17 @@ public class GalleryActionBar implements ActionBar.OnNavigationListener { }).create().show(); } + public void setDisplayOptions(boolean displayHomeAsUp, boolean showTitle) { + if (mActionBar != null) { + int options = (displayHomeAsUp ? ActionBar.DISPLAY_HOME_AS_UP : 0) | + (showTitle ? ActionBar.DISPLAY_SHOW_TITLE : 0); + mActionBar.setDisplayOptions( + options, + ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_TITLE); + mActionBar.setHomeButtonEnabled(displayHomeAsUp); + } + } + public void setTitle(String title) { if (mActionBar != null) mActionBar.setTitle(title); } |