diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-08-10 17:58:32 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-08-10 18:15:32 +0800 |
commit | 5e270b255775e1aae76cb476873001798ad8e88a (patch) | |
tree | 3de6e402febc32155d48481bc58a28254ec08d11 /src | |
parent | 89155720bce8b530659bcdd48bcb3802bc80a6ba (diff) | |
download | LegacyCamera-5e270b255775e1aae76cb476873001798ad8e88a.zip LegacyCamera-5e270b255775e1aae76cb476873001798ad8e88a.tar.gz LegacyCamera-5e270b255775e1aae76cb476873001798ad8e88a.tar.bz2 |
Remove share icon and close arrow.
Alose increase the speed of icon rotation.
bug:5141343
bug:5141404
bug:5141514
Change-Id: I0db6b6edbc0fc1a0f83b4f29f6828bcff01bf0c4
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/Camera.java | 12 | ||||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 13 | ||||
-rw-r--r-- | src/com/android/camera/ui/RotateImageView.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/ui/SharePopup.java | 4 |
4 files changed, 7 insertions, 24 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 7ac3023..e815a77 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -162,11 +162,8 @@ public class Camera extends ActivityBase implements View.OnClickListener, // The bitmap of the last captured picture thumbnail and the URI of the // original picture. private Thumbnail mThumbnail; - // A button that contains the thumbnail and the share icon. - private View mShareButton; // An imageview showing showing the last captured picture thumbnail. private RotateImageView mThumbnailView; - private RotateImageView mShareIcon; private ModePicker mModePicker; // mCropValue and mSaveUri are used only if isImageCaptureIntent() is true. @@ -409,7 +406,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, } private void initThumbnailButton() { - mShareButton.setOnClickListener(this); + mThumbnailView.setOnClickListener(this); // Load the thumbnail from the disk. mThumbnail = Thumbnail.loadFrom(new File(getFilesDir(), LAST_THUMB_FILENAME)); updateThumbnailButton(); @@ -980,9 +977,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, setContentView(R.layout.camera); } mFocusRectangle = (FocusRectangle) findViewById(R.id.focus_rectangle); - mShareButton = findViewById(R.id.share_button); mThumbnailView = (RotateImageView) findViewById(R.id.thumbnail); - mShareIcon = (RotateImageView) findViewById(R.id.share_icon); mPreferences = new ComboPreferences(this); CameraSettings.upgradeGlobalPreferences(mPreferences.getGlobal()); @@ -1174,7 +1169,6 @@ public class Camera extends ActivityBase implements View.OnClickListener, private void setOrientationIndicator(int degree) { if (mThumbnailView != null) mThumbnailView.setDegree(degree); - if (mShareIcon != null) mShareIcon.setDegree(degree); if (mModePicker != null) mModePicker.setDegree(degree); if (mSharePopup != null) mSharePopup.setOrientation(degree); if (mIndicatorControl != null) mIndicatorControl.setDegree(degree); @@ -1201,7 +1195,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, @Override public void onClick(View v) { switch (v.getId()) { - case R.id.share_button: + case R.id.thumbnail: if (isCameraIdle() && mThumbnail != null) { showSharePopup(); } @@ -2365,7 +2359,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, Uri uri = mThumbnail.getUri(); if (mSharePopup == null || !uri.equals(mSharePopup.getUri())) { mSharePopup = new SharePopup(this, uri, mThumbnail.getBitmap(), "image/jpeg", - mOrientationCompensation, mShareButton); + mOrientationCompensation, mThumbnailView); } mSharePopup.showAtLocation(mThumbnailView, Gravity.NO_GRAVITY, 0, 0); } diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index c6817a5..7ee148f 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -152,11 +152,8 @@ public class VideoCamera extends ActivityBase // The bitmap of the last captured video thumbnail and the URI of the // original video. private Thumbnail mThumbnail; - // A button that contains the thumbnail and the share icon. - private View mShareButton; // An imageview showing showing the last captured picture thumbnail. private RotateImageView mThumbnailView; - private RotateImageView mShareIcon; private ModePicker mModePicker; private ShutterButton mShutterButton; private TextView mRecordingTimeView; @@ -401,7 +398,6 @@ public class VideoCamera extends ActivityBase setContentView(R.layout.video_camera); initThumbnailButton(); - mShareIcon = (RotateImageView) findViewById(R.id.share_icon); mModePicker = (ModePicker) findViewById(R.id.mode_picker); mModePicker.setVisibility(View.VISIBLE); mModePicker.setOnModeChangeListener(this); @@ -412,8 +408,6 @@ public class VideoCamera extends ActivityBase mPreviewFrameLayout.setOnSizeChangedListener(this); mReviewImage = (ImageView) findViewById(R.id.review_image); - mShareButton = findViewById(R.id.share_button); - mShareIcon = (RotateImageView) findViewById(R.id.share_icon); mModePicker = (ModePicker) findViewById(R.id.mode_picker); // don't set mSurfaceHolder here. We have it set ONLY within @@ -560,7 +554,6 @@ public class VideoCamera extends ActivityBase private void setOrientationIndicator(int degree) { if (mThumbnailView != null) mThumbnailView.setDegree(degree); - if (mShareIcon != null) mShareIcon.setDegree(degree); if (mModePicker != null) mModePicker.setDegree(degree); if (mSharePopup != null) mSharePopup.setOrientation(degree); if (mIndicatorControl != null) mIndicatorControl.setDegree(degree); @@ -579,7 +572,7 @@ public class VideoCamera extends ActivityBase @Override public void onClick(View v) { switch (v.getId()) { - case R.id.share_button: + case R.id.thumbnail: if (!mMediaRecorderRecording && mThumbnail != null) { showSharePopup(); } @@ -1566,7 +1559,7 @@ public class VideoCamera extends ActivityBase private void initThumbnailButton() { mThumbnailView = (RotateImageView) findViewById(R.id.thumbnail); - findViewById(R.id.share_button).setOnClickListener(this); + mThumbnailView.setOnClickListener(this); // Load the thumbnail from the disk. mThumbnail = Thumbnail.loadFrom(new File(getFilesDir(), LAST_THUMB_FILENAME)); } @@ -1847,7 +1840,7 @@ public class VideoCamera extends ActivityBase Uri uri = mThumbnail.getUri(); if (mSharePopup == null || !uri.equals(mSharePopup.getUri())) { mSharePopup = new SharePopup(this, uri, mThumbnail.getBitmap(), - "video/*", mOrientationCompensation, mShareButton); + "video/*", mOrientationCompensation, mThumbnailView); } mSharePopup.showAtLocation(mThumbnailView, Gravity.NO_GRAVITY, 0, 0); } diff --git a/src/com/android/camera/ui/RotateImageView.java b/src/com/android/camera/ui/RotateImageView.java index 80752a2..c58d0c9 100644 --- a/src/com/android/camera/ui/RotateImageView.java +++ b/src/com/android/camera/ui/RotateImageView.java @@ -37,7 +37,7 @@ public class RotateImageView extends ImageView { @SuppressWarnings("unused") private static final String TAG = "RotateImageView"; - private static final int ANIMATION_SPEED = 180; // 180 deg/sec + private static final int ANIMATION_SPEED = 270; // 270 deg/sec private int mCurrentDegree = 0; // [0, 359] private int mStartDegree = 0; diff --git a/src/com/android/camera/ui/SharePopup.java b/src/com/android/camera/ui/SharePopup.java index fc26c90..aa34abf 100644 --- a/src/com/android/camera/ui/SharePopup.java +++ b/src/com/android/camera/ui/SharePopup.java @@ -101,7 +101,6 @@ public class SharePopup extends PopupWindow implements View.OnClickListener, mRootView = (ViewGroup) sharePopup.findViewById(R.id.root); mThumbnail.setImageBitmap(bitmap); mThumbnail.setOnClickListener(this); - sharePopup.findViewById(R.id.collapse_button).setOnClickListener(this); mBitmapWidth = bitmap.getWidth(); mBitmapHeight = bitmap.getHeight(); Resources res = mContext.getResources(); @@ -177,9 +176,6 @@ public class SharePopup extends PopupWindow implements View.OnClickListener, case R.id.thumbnail: Util.viewUri(mUri, mContext); break; - case R.id.collapse_button: - dismiss(); - break; } } |