summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2012-10-11 14:49:09 -0700
committerBobby Georgescu <georgescu@google.com>2012-10-11 15:20:07 -0700
commite6db54f80fafd755121a02ff1e0460bbc1cbfde8 (patch)
treeb3c7056b949b8180a8c4451c15bec0f33f38fc10
parent1ac23d436d226a926adc5685b8cf30a32a0afea7 (diff)
downloadandroid_packages_apps_Snap-e6db54f80fafd755121a02ff1e0460bbc1cbfde8.tar.gz
android_packages_apps_Snap-e6db54f80fafd755121a02ff1e0460bbc1cbfde8.tar.bz2
android_packages_apps_Snap-e6db54f80fafd755121a02ff1e0460bbc1cbfde8.zip
Change ActionBar spinner text size on rotate
Bug: 7333151 Update the grid/filmstrip spinner switch text to look and behave like the text in the Gmail app, as requested by UX. Change-Id: If822b21899172a35402477868d4f146a8e00cfea
-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);