summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-11 16:00:01 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-11 16:00:02 -0700
commitdd1586912b5da958b33a0d9f07312160d1cb103b (patch)
tree1c105f36cbaddbbd36a2c00687eabe54249bdad5 /src
parent825afb1b3e7d15b5c258d664ee008dc68da1c407 (diff)
parent5d4b8fd9fd2e601b780c027ef912c8fabfe3ee1e (diff)
downloadandroid_packages_apps_Gallery2-dd1586912b5da958b33a0d9f07312160d1cb103b.tar.gz
android_packages_apps_Gallery2-dd1586912b5da958b33a0d9f07312160d1cb103b.tar.bz2
android_packages_apps_Gallery2-dd1586912b5da958b33a0d9f07312160d1cb103b.zip
Merge "Change ActionBar spinner text size on rotate" into gb-ub-photos-arches
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/AbstractGalleryActivity.java1
-rw-r--r--src/com/android/gallery3d/app/GalleryActionBar.java9
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);