public void onConfigurationChanged(Configuration config) {
super.onConfigurationChanged(config);
mStateManager.onConfigurationChange(config);
+ getGalleryActionBar().onConfigurationChanged();
invalidateOptionsMenu();
toggleStatusBarByOrientation();
}
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;
}
}
+ 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) {
mAlbumModeAdapter = new AlbumModeAdapter();
}
mAlbumModeListener = null;
+ mLastAlbumModeSelected = selected;
mActionBar.setListNavigationCallbacks(mAlbumModeAdapter, this);
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
mActionBar.setSelectedNavigationItem(selected);