diff options
-rw-r--r-- | res/drawable-hdpi/ic_viewfinder_share.jpg | bin | 906 -> 0 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_viewfinder_share.png | bin | 624 -> 0 bytes | |||
-rw-r--r-- | res/drawable-w1024dp-mdpi/ic_viewfinder_share.png | bin | 1472 -> 0 bytes | |||
-rw-r--r-- | res/layout-w1024dp/review_thumbnail.xml | 18 | ||||
-rw-r--r-- | res/layout/review_thumbnail.xml | 13 | ||||
-rw-r--r-- | res/layout/share_popup.xml | 7 | ||||
-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 |
10 files changed, 17 insertions, 52 deletions
diff --git a/res/drawable-hdpi/ic_viewfinder_share.jpg b/res/drawable-hdpi/ic_viewfinder_share.jpg Binary files differdeleted file mode 100644 index 7a8949d..0000000 --- a/res/drawable-hdpi/ic_viewfinder_share.jpg +++ /dev/null diff --git a/res/drawable-mdpi/ic_viewfinder_share.png b/res/drawable-mdpi/ic_viewfinder_share.png Binary files differdeleted file mode 100644 index a73bec5..0000000 --- a/res/drawable-mdpi/ic_viewfinder_share.png +++ /dev/null diff --git a/res/drawable-w1024dp-mdpi/ic_viewfinder_share.png b/res/drawable-w1024dp-mdpi/ic_viewfinder_share.png Binary files differdeleted file mode 100644 index d8f223a..0000000 --- a/res/drawable-w1024dp-mdpi/ic_viewfinder_share.png +++ /dev/null diff --git a/res/layout-w1024dp/review_thumbnail.xml b/res/layout-w1024dp/review_thumbnail.xml index 0f8c4d1..d206997 100644 --- a/res/layout-w1024dp/review_thumbnail.xml +++ b/res/layout-w1024dp/review_thumbnail.xml @@ -14,10 +14,10 @@ limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/share_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" +<com.android.camera.ui.RotateImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/thumbnail" + android:layout_width="86dp" + android:layout_height="86dp" android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_marginTop="@dimen/thumbnail_margin_top" @@ -26,12 +26,4 @@ android:clickable="true" android:focusable="false" android:background="@drawable/border_last_picture"> - <com.android.camera.ui.RotateImageView android:id="@+id/share_icon" - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:src="@drawable/ic_viewfinder_share" - android:background="@android:color/black" /> - <com.android.camera.ui.RotateImageView android:id="@+id/thumbnail" - android:layout_width="86dp" - android:layout_height="86dp"/> -</LinearLayout>
\ No newline at end of file +</com.android.camera.ui.RotateImageView>
\ No newline at end of file diff --git a/res/layout/review_thumbnail.xml b/res/layout/review_thumbnail.xml index ef5e821..0593307 100644 --- a/res/layout/review_thumbnail.xml +++ b/res/layout/review_thumbnail.xml @@ -14,17 +14,14 @@ limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/share_button" - android:layout_width="wrap_content" - android:layout_height="wrap_content" +<com.android.camera.ui.RotateImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/thumbnail" + android:layout_width="52dp" + android:layout_height="52dp" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:orientation="vertical" android:clickable="true" android:focusable="false" android:background="@drawable/border_last_picture"> - <com.android.camera.ui.RotateImageView android:id="@+id/thumbnail" - android:layout_width="52dp" - android:layout_height="52dp"/> -</LinearLayout> +</com.android.camera.ui.RotateImageView> diff --git a/res/layout/share_popup.xml b/res/layout/share_popup.xml index 06b0e2a..5e5d2a2 100644 --- a/res/layout/share_popup.xml +++ b/res/layout/share_popup.xml @@ -79,12 +79,5 @@ android:scaleType="fitCenter" android:background="@drawable/border_last_picture" /> </com.android.camera.ui.RotateLayout> - <ImageView android:id="@+id/collapse_button" - android:layout_width="56dp" - android:layout_height="56dp" - android:layout_alignParentTop="true" - android:layout_alignParentRight="true" - android:src="@drawable/btn_ic_review_play" - android:scaleType="center" /> </RelativeLayout> </FrameLayout> 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; } } |