diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-11 16:00:01 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-11 16:00:02 -0700 |
commit | 41e5ba847a36925e78f76c5b59898ae907e42d95 (patch) | |
tree | 2bc2e72943477811b7265f93c6b9972fc4f07831 /src/com/android/gallery3d | |
parent | 83e7d70bccd93c348d70048e1add3cc1c4ac33c6 (diff) | |
parent | e6db54f80fafd755121a02ff1e0460bbc1cbfde8 (diff) | |
download | android_packages_apps_Snap-41e5ba847a36925e78f76c5b59898ae907e42d95.tar.gz android_packages_apps_Snap-41e5ba847a36925e78f76c5b59898ae907e42d95.tar.bz2 android_packages_apps_Snap-41e5ba847a36925e78f76c5b59898ae907e42d95.zip |
Merge "Change ActionBar spinner text size on rotate" into gb-ub-photos-arches
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/app/AbstractGalleryActivity.java | 1 | ||||
-rw-r--r-- | src/com/android/gallery3d/app/GalleryActionBar.java | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java index 5e779cd59..cb3aa9d0a 100644 --- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java +++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java @@ -84,6 +84,7 @@ public class AbstractGalleryActivity extends Activity implements GalleryContext public void onConfigurationChanged(Configuration config) { super.onConfigurationChanged(config); mStateManager.onConfigurationChange(config); + getGalleryActionBar().onConfigurationChanged(); invalidateOptionsMenu(); toggleStatusBarByOrientation(); } diff --git a/src/com/android/gallery3d/app/GalleryActionBar.java b/src/com/android/gallery3d/app/GalleryActionBar.java index 1729c6433..f0be01a91 100644 --- a/src/com/android/gallery3d/app/GalleryActionBar.java +++ b/src/com/android/gallery3d/app/GalleryActionBar.java @@ -57,6 +57,7 @@ public class GalleryActionBar implements OnNavigationListener { private AlbumModeAdapter mAlbumModeAdapter; private OnAlbumModeSelectedListener mAlbumModeListener; + private int mLastAlbumModeSelected; private CharSequence [] mAlbumModes; public static final int ALBUM_FILMSTRIP_MODE_SELECTED = 0; public static final int ALBUM_GRID_MODE_SELECTED = 1; @@ -254,6 +255,13 @@ public class GalleryActionBar implements OnNavigationListener { } } + public void onConfigurationChanged() { + if (mActionBar != null && mAlbumModeListener != null) { + OnAlbumModeSelectedListener listener = mAlbumModeListener; + enableAlbumModeMenu(mLastAlbumModeSelected, listener); + } + } + public void enableAlbumModeMenu(int selected, OnAlbumModeSelectedListener listener) { if (mActionBar != null) { if (mAlbumModeAdapter == null) { @@ -265,6 +273,7 @@ public class GalleryActionBar implements OnNavigationListener { mAlbumModeAdapter = new AlbumModeAdapter(); } mAlbumModeListener = null; + mLastAlbumModeSelected = selected; mActionBar.setListNavigationCallbacks(mAlbumModeAdapter, this); mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); mActionBar.setSelectedNavigationItem(selected); |