private static final String TAG = "PhotoPage";
private static final int MSG_HIDE_BARS = 1;
- private static final int MSG_LOCK_ORIENTATION = 2;
- private static final int MSG_UNLOCK_ORIENTATION = 3;
private static final int MSG_ON_FULL_SCREEN_CHANGED = 4;
private static final int MSG_UPDATE_ACTION_BAR = 5;
private static final int MSG_UNFREEZE_GLROOT = 6;
if (mBottomControls != null) mBottomControls.refresh();
break;
}
- case MSG_LOCK_ORIENTATION: {
- mOrientationManager.lockOrientation();
- break;
- }
- case MSG_UNLOCK_ORIENTATION: {
- mOrientationManager.unlockOrientation();
- break;
- }
case MSG_ON_FULL_SCREEN_CHANGED: {
mAppBridge.onFullScreenChanged(message.arg1 == 1);
break;
}
if (stayedOnCamera) {
- lockOrientation();
updateBars();
updateCurrentPhoto(mModel.getMediaItem(0));
}
mShowBars = false;
mInCameraRoll = true;
mAppBridge.setServer(this);
- mOrientationManager.lockOrientation();
// Get the ScreenNail from AppBridge and register it.
int id = SnailSource.newId();
}
@Override
- public void lockOrientation() {
- mHandler.sendEmptyMessage(MSG_LOCK_ORIENTATION);
- }
-
- @Override
- public void unlockOrientation() {
- mHandler.sendEmptyMessage(MSG_UNLOCK_ORIENTATION);
- }
-
- @Override
public void onActionBarAllowed(boolean allowed) {
mActionBarAllowed = allowed;
mHandler.sendEmptyMessage(MSG_UPDATE_ACTION_BAR);
public interface Listener {
public void onSingleTapUp(int x, int y);
- public void lockOrientation();
- public void unlockOrientation();
public void onFullScreenChanged(boolean full);
public void onActionBarAllowed(boolean allowed);
public void onActionBarWanted();
boolean isCamera = mPictures.get(0).isCamera();
if (isCamera && !mFilmMode) {
// Move into camera in page mode, lock
- mListener.lockOrientation();
mListener.onActionBarAllowed(false);
} else {
mListener.onActionBarAllowed(true);