Support drawing in different orientation in Gallery.
Bug 6312994: Swipe UX: do not directly show the camera roll when camera starts
Bug 6313191: Swipe UX: Change swipe direction after the user rotated the device
Bug 6313192: Swiping UX: make Gallery display in rotated mode
Bug 6399447: Filmstrip: in Gallery, pressing Back from filmstrip doesn't perform the right animation
Bug 6399974: Filmstrip: when swiping from full-screen photo to filmstrip mode, camera view and the photo-roll don't align correctly
Bug 6400014: Swiping UX: in Camera portrait mode, tapping on the Thumbnail doesn't align camera view and the photo-roll correctly
Bug 6401075: Able to scroll through the gallery pics while capturing video.
Bug 6405087: Filmstrip does not change with orientation
Change-Id: I8c479d87800c63b7a95c199c0c1c3bc512d66d42
diff --git a/src/com/android/gallery3d/app/AbstractGalleryActivity.java b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
index 09e72c0..2c63e34 100644
--- a/src/com/android/gallery3d/app/AbstractGalleryActivity.java
+++ b/src/com/android/gallery3d/app/AbstractGalleryActivity.java
@@ -44,6 +44,7 @@
private GLRootView mGLRootView;
private StateManager mStateManager;
private GalleryActionBar mActionBar;
+ private OrientationManager mOrientationManager;
private boolean mDisableToggleStatusBar;
private AlertDialog mAlertDialog = null;
@@ -58,6 +59,7 @@
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ mOrientationManager = new OrientationManager(this);
toggleStatusBarByOrientation();
}
@@ -103,6 +105,10 @@
return mGLRootView;
}
+ public OrientationManager getOrientationManager() {
+ return mOrientationManager;
+ }
+
@Override
public void setContentView(int resId) {
super.setContentView(resId);
@@ -165,11 +171,13 @@
mGLRootView.unlockRenderThread();
}
mGLRootView.onResume();
+ mOrientationManager.resume();
}
@Override
protected void onPause() {
super.onPause();
+ mOrientationManager.pause();
mGLRootView.onPause();
mGLRootView.lockRenderThread();
try {