diff options
author | Bobby Georgescu <georgescu@google.com> | 2012-10-11 16:01:45 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-11 16:01:45 -0700 |
commit | 9191bd974dd8920cdf6b1efecdb09153b667e2d7 (patch) | |
tree | aa6d530d22a1f9668d1ca2be7c51a0df5d18bfbb | |
parent | 59b7ded957cd0b49589ad711dd8105d74a0a23ab (diff) | |
parent | 41e5ba847a36925e78f76c5b59898ae907e42d95 (diff) | |
download | android_packages_apps_Snap-9191bd974dd8920cdf6b1efecdb09153b667e2d7.tar.gz android_packages_apps_Snap-9191bd974dd8920cdf6b1efecdb09153b667e2d7.tar.bz2 android_packages_apps_Snap-9191bd974dd8920cdf6b1efecdb09153b667e2d7.zip |
am dd158691: Merge "Change ActionBar spinner text size on rotate" into gb-ub-photos-arches
* commit 'dd1586912b5da958b33a0d9f07312160d1cb103b':
Change ActionBar spinner text size on rotate
-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); |