From 78a5b224eca3c702f4ecf8abd072779e32e26641 Mon Sep 17 00:00:00 2001 From: Michael Kolb Date: Tue, 30 Apr 2013 15:34:19 -0700 Subject: Update capture animation Bug: 8253060 Update preview thumb margins and size Add touch target for thumbnail Change-Id: I2b298de330834c42a55b4cb082148d971727f530 --- src/com/android/camera/PhotoUI.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/com/android/camera/PhotoUI.java') diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 094910496..bc43f4763 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -92,6 +92,7 @@ public class PhotoUI implements PieListener, private int mPreviewWidth = 0; private int mPreviewHeight = 0; + private View mPreviewThumb; private OnLayoutChangeListener mLayoutListener = new OnLayoutChangeListener() { @Override @@ -173,6 +174,7 @@ public class PhotoUI implements PieListener, mGestures.setRenderOverlay(mRenderOverlay); mGestures.addTouchReceiver(mMenuButton); mGestures.addUnclickableArea(mBlocker); + enablePreviewThumb(false); // make sure to add touch targets for image capture if (mController.isImageCaptureIntent()) { if (mReviewCancelButton != null) { @@ -201,6 +203,13 @@ public class PhotoUI implements PieListener, public void initializeControlByIntent() { mBlocker = mActivity.findViewById(R.id.blocker); + mPreviewThumb = mActivity.findViewById(R.id.preview_thumb); + mPreviewThumb.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + mActivity.gotoGallery(); + } + }); mMenuButton = mActivity.findViewById(R.id.menu); mMenuButton.setOnClickListener(new OnClickListener() { @Override @@ -367,6 +376,16 @@ public class PhotoUI implements PieListener, if (!full && mCountDownView != null) mCountDownView.cancelCountDown(); } + public void enablePreviewThumb(boolean enabled) { + if (enabled) { + mGestures.addTouchReceiver(mPreviewThumb); + mPreviewThumb.setVisibility(View.VISIBLE); + } else { + mGestures.removeTouchReceiver(mPreviewThumb); + mPreviewThumb.setVisibility(View.GONE); + } + } + public boolean removeTopLevelPopup() { // Remove the top level popup or dialog box and return true if there's any if (mPopup != null) { -- cgit v1.2.3