diff options
author | Chih-yu Huang <akahuang@google.com> | 2011-09-08 15:53:56 +0800 |
---|---|---|
committer | Chih-yu Huang <akahuang@google.com> | 2011-09-16 19:13:21 +0800 |
commit | 30f0481931beed547656f2c7bc6290ecc9b01ac3 (patch) | |
tree | 92f5707e6e71240c05e0d824e90521409dde3ad5 | |
parent | 6c5b20113ba9f91352f32e5a53df66aec0ec761a (diff) | |
download | LegacyCamera-30f0481931beed547656f2c7bc6290ecc9b01ac3.zip LegacyCamera-30f0481931beed547656f2c7bc6290ecc9b01ac3.tar.gz LegacyCamera-30f0481931beed547656f2c7bc6290ecc9b01ac3.tar.bz2 |
Change image of review control buttons.
bug:5244256
Change-Id: Idf02f40edb7e2e15edb4fc1ac86a4694d9147661
34 files changed, 181 insertions, 95 deletions
diff --git a/res/drawable-hdpi/btn_retake_shutter_holo.png b/res/drawable-hdpi/btn_retake_shutter_holo.png Binary files differnew file mode 100644 index 0000000..8f3f39f --- /dev/null +++ b/res/drawable-hdpi/btn_retake_shutter_holo.png diff --git a/res/drawable-hdpi/btn_retake_shutter_pressed_holo.png b/res/drawable-hdpi/btn_retake_shutter_pressed_holo.png Binary files differnew file mode 100644 index 0000000..84c7935 --- /dev/null +++ b/res/drawable-hdpi/btn_retake_shutter_pressed_holo.png diff --git a/res/drawable-hdpi/ic_menu_cancel_holo_light.png b/res/drawable-hdpi/ic_menu_cancel_holo_light.png Binary files differindex cb9abb9..8de1ae6 100644 --- a/res/drawable-hdpi/ic_menu_cancel_holo_light.png +++ b/res/drawable-hdpi/ic_menu_cancel_holo_light.png diff --git a/res/drawable-hdpi/ic_menu_done_holo_light.png b/res/drawable-hdpi/ic_menu_done_holo_light.png Binary files differindex fb56f3a..8649f42 100644 --- a/res/drawable-hdpi/ic_menu_done_holo_light.png +++ b/res/drawable-hdpi/ic_menu_done_holo_light.png diff --git a/res/drawable-hdpi/list_pressed_holo_light.9.png b/res/drawable-hdpi/list_pressed_holo_light.9.png Binary files differnew file mode 100644 index 0000000..5654cd6 --- /dev/null +++ b/res/drawable-hdpi/list_pressed_holo_light.9.png diff --git a/res/drawable-mdpi/btn_retake_shutter_holo.png b/res/drawable-mdpi/btn_retake_shutter_holo.png Binary files differnew file mode 100644 index 0000000..062ad9d --- /dev/null +++ b/res/drawable-mdpi/btn_retake_shutter_holo.png diff --git a/res/drawable-mdpi/btn_retake_shutter_pressed_holo.png b/res/drawable-mdpi/btn_retake_shutter_pressed_holo.png Binary files differnew file mode 100644 index 0000000..a1a9e73 --- /dev/null +++ b/res/drawable-mdpi/btn_retake_shutter_pressed_holo.png diff --git a/res/drawable-mdpi/ic_menu_cancel_holo_light.png b/res/drawable-mdpi/ic_menu_cancel_holo_light.png Binary files differindex cb9abb9..94d35da 100644 --- a/res/drawable-mdpi/ic_menu_cancel_holo_light.png +++ b/res/drawable-mdpi/ic_menu_cancel_holo_light.png diff --git a/res/drawable-mdpi/ic_menu_done_holo_light.png b/res/drawable-mdpi/ic_menu_done_holo_light.png Binary files differindex fb56f3a..06c0109 100644 --- a/res/drawable-mdpi/ic_menu_done_holo_light.png +++ b/res/drawable-mdpi/ic_menu_done_holo_light.png diff --git a/res/drawable-mdpi/list_pressed_holo_light.9.png b/res/drawable-mdpi/list_pressed_holo_light.9.png Binary files differnew file mode 100644 index 0000000..6e77525 --- /dev/null +++ b/res/drawable-mdpi/list_pressed_holo_light.9.png diff --git a/res/drawable-w1024dp-hdpi/btn_retake_shutter_holo.png b/res/drawable-w1024dp-hdpi/btn_retake_shutter_holo.png Binary files differnew file mode 100644 index 0000000..a812971 --- /dev/null +++ b/res/drawable-w1024dp-hdpi/btn_retake_shutter_holo.png diff --git a/res/drawable-w1024dp-hdpi/btn_retake_shutter_pressed_holo.png b/res/drawable-w1024dp-hdpi/btn_retake_shutter_pressed_holo.png Binary files differnew file mode 100644 index 0000000..b3e852b --- /dev/null +++ b/res/drawable-w1024dp-hdpi/btn_retake_shutter_pressed_holo.png diff --git a/res/drawable-w1024dp-mdpi/btn_retake_shutter_holo.png b/res/drawable-w1024dp-mdpi/btn_retake_shutter_holo.png Binary files differnew file mode 100644 index 0000000..c292d59 --- /dev/null +++ b/res/drawable-w1024dp-mdpi/btn_retake_shutter_holo.png diff --git a/res/drawable-w1024dp-mdpi/btn_retake_shutter_pressed_holo.png b/res/drawable-w1024dp-mdpi/btn_retake_shutter_pressed_holo.png Binary files differnew file mode 100644 index 0000000..fe083ee --- /dev/null +++ b/res/drawable-w1024dp-mdpi/btn_retake_shutter_pressed_holo.png diff --git a/res/drawable-w1024dp-xhdpi/btn_retake_shutter_holo.png b/res/drawable-w1024dp-xhdpi/btn_retake_shutter_holo.png Binary files differnew file mode 100644 index 0000000..6cae86f --- /dev/null +++ b/res/drawable-w1024dp-xhdpi/btn_retake_shutter_holo.png diff --git a/res/drawable-w1024dp-xhdpi/btn_retake_shutter_pressed_holo.png b/res/drawable-w1024dp-xhdpi/btn_retake_shutter_pressed_holo.png Binary files differnew file mode 100644 index 0000000..2120ab1 --- /dev/null +++ b/res/drawable-w1024dp-xhdpi/btn_retake_shutter_pressed_holo.png diff --git a/res/drawable-xhdpi/btn_retake_shutter_holo.png b/res/drawable-xhdpi/btn_retake_shutter_holo.png Binary files differnew file mode 100644 index 0000000..d87e496 --- /dev/null +++ b/res/drawable-xhdpi/btn_retake_shutter_holo.png diff --git a/res/drawable-xhdpi/btn_retake_shutter_pressed_holo.png b/res/drawable-xhdpi/btn_retake_shutter_pressed_holo.png Binary files differnew file mode 100644 index 0000000..4aa4dd0 --- /dev/null +++ b/res/drawable-xhdpi/btn_retake_shutter_pressed_holo.png diff --git a/res/drawable-xhdpi/ic_menu_cancel_holo_light.png b/res/drawable-xhdpi/ic_menu_cancel_holo_light.png Binary files differnew file mode 100644 index 0000000..e4f8c22 --- /dev/null +++ b/res/drawable-xhdpi/ic_menu_cancel_holo_light.png diff --git a/res/drawable-xhdpi/ic_menu_done_holo_light.png b/res/drawable-xhdpi/ic_menu_done_holo_light.png Binary files differnew file mode 100644 index 0000000..2485c62 --- /dev/null +++ b/res/drawable-xhdpi/ic_menu_done_holo_light.png diff --git a/res/drawable-xhdpi/list_pressed_holo_light.9.png b/res/drawable-xhdpi/list_pressed_holo_light.9.png Binary files differnew file mode 100644 index 0000000..e4b3393 --- /dev/null +++ b/res/drawable-xhdpi/list_pressed_holo_light.9.png diff --git a/res/drawable/bg_review_control.xml b/res/drawable/bg_review_control.xml new file mode 100644 index 0000000..979cc86 --- /dev/null +++ b/res/drawable/bg_review_control.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" android:drawable="@drawable/list_pressed_holo_light" /> + <item android:drawable="@android:color/transparent" /> +</selector> diff --git a/res/drawable/btn_shutter_retake.xml b/res/drawable/btn_shutter_retake.xml new file mode 100644 index 0000000..0a836b9 --- /dev/null +++ b/res/drawable/btn_shutter_retake.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_pressed="true" android:drawable="@drawable/btn_retake_shutter_pressed_holo" /> + <item android:drawable="@drawable/btn_retake_shutter_holo" /> +</selector> + diff --git a/res/layout-w1024dp/camera_control.xml b/res/layout-w1024dp/camera_control.xml index 63bb643..194547a 100644 --- a/res/layout-w1024dp/camera_control.xml +++ b/res/layout-w1024dp/camera_control.xml @@ -28,7 +28,6 @@ <include layout="@layout/review_thumbnail" /> <include layout="@layout/review_control" /> - <com.android.camera.ui.IndicatorControlWheelContainer android:id="@+id/indicator_control" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -51,6 +50,6 @@ android:layout_height="match_parent" android:visibility="gone" /> </com.android.camera.ui.IndicatorControlWheelContainer> - <include layout="@layout/mode_picker"/> + <include layout="@layout/mode_picker" /> </com.android.camera.ui.ControlPanelLayout> diff --git a/res/layout-w1024dp/preview_frame_video.xml b/res/layout-w1024dp/preview_frame_video.xml index edd176a..8a5ecd5 100644 --- a/res/layout-w1024dp/preview_frame_video.xml +++ b/res/layout-w1024dp/preview_frame_video.xml @@ -24,7 +24,7 @@ android:layout_height="match_parent"> <SurfaceView android:id="@+id/camera_preview" android:layout_width="match_parent" - android:layout_height="match_parent"/> + android:layout_height="match_parent" /> <LinearLayout android:id="@+id/labels" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -33,39 +33,37 @@ <TextView android:id="@+id/time_lapse_label" android:text="@string/time_lapse_title" style="@style/OnViewfinderLabel" - android:visibility="gone"/> + android:visibility="gone" /> <TextView android:id="@+id/recording_time" style="@style/OnViewfinderLabel" android:gravity="center" android:drawableLeft="@drawable/ic_recording_indicator_small" android:drawablePadding="5dp" - android:visibility="gone"/> + android:visibility="gone" /> </LinearLayout> <TextView android:id="@+id/bg_replace_message" - android:layout_width="300dp" - android:layout_height="wrap_content" - android:layout_centerInParent="true" - android:padding="32dp" - android:layout_margin="24dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:visibility="gone" - android:background="@drawable/bg_text_on_preview" - android:text="@string/bg_replacement_message" /> - <ImageButton android:id="@+id/btn_play" - style="@style/ReviewControlIcon" + android:layout_width="300dp" + android:layout_height="wrap_content" android:layout_centerInParent="true" - android:src="@drawable/btn_ic_review_play" + android:padding="32dp" + android:layout_margin="24dp" + android:textAppearance="?android:attr/textAppearanceMedium" android:visibility="gone" - android:onClick="onPlayButtonClicked"/> + android:background="@drawable/bg_text_on_preview" + android:text="@string/bg_replacement_message" /> + <ImageButton android:id="@+id/btn_play" + style="@style/ReviewPlayIcon" + android:src="@drawable/btn_ic_review_play" + android:onClick="onPlayButtonClicked" /> <ImageView android:id="@+id/review_image" android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone" - android:background="@android:color/black"/> + android:background="@android:color/black" /> </RelativeLayout> <!-- Border for video snapshot. --> <View android:id="@+id/preview_border" android:layout_width="match_parent" android:layout_height="match_parent" - android:visibility="gone"/> + android:visibility="gone" /> </com.android.camera.PreviewFrameLayout> diff --git a/res/layout-w1024dp/review_control.xml b/res/layout-w1024dp/review_control.xml index a973dc8..7fdbafb 100644 --- a/res/layout-w1024dp/review_control.xml +++ b/res/layout-w1024dp/review_control.xml @@ -14,27 +14,38 @@ limitations under the License. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/review_control" - android:orientation="vertical" - android:layout_height="wrap_content" android:layout_width="match_parent" - android:layout_alignParentTop="true" - android:gravity="center_horizontal" - android:layout_marginTop="30dp"> - <Button android:id="@+id/btn_cancel" - android:text="@string/review_cancel" - style="@style/ReviewControlIcon" + android:layout_height="match_parent"> + <LinearLayout style="@style/ReviewControlGroup" + android:id="@+id/btn_cancel" + android:onClick="onCancelButtonClicked" + android:layout_alignParentTop="true" + android:layout_marginTop="36dp"> + <ImageView style="@style/ReviewControlIcon" + android:src="@drawable/ic_menu_cancel_holo_light" /> + <TextView style="@style/ReviewControlText" + android:text="@string/review_cancel" /> + </LinearLayout> + <ImageView android:id="@+id/btn_retake" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:clickable="true" + android:focusable="true" android:visibility="gone" - android:onClick="onCancelButtonClicked" /> - <Button android:id="@+id/btn_retake" - android:text="@string/review_retake" - style="@style/ReviewControlIcon" - android:visibility="gone" - android:onClick="onRetakeButtonClicked" /> - <ImageButton android:id="@+id/btn_done" - android:src="@drawable/ic_menu_done_holo_light" - style="@style/ReviewControlIcon" - android:visibility="gone" - android:onClick="onDoneButtonClicked" /> -</LinearLayout> + android:onClick="onRetakeButtonClicked" + android:background="@drawable/btn_shutter_retake" /> + <LinearLayout style="@style/ReviewControlGroup" + android:id="@+id/btn_done" + android:onClick="onDoneButtonClicked" + android:layout_alignParentBottom="true" + android:layout_marginBottom="36dp"> + <ImageView style="@style/ReviewControlIcon" + android:src="@drawable/ic_menu_done_holo_light" /> + <TextView style="@style/ReviewControlText" + android:text="@string/review_ok" /> + </LinearLayout> +</RelativeLayout> diff --git a/res/layout/camera_control.xml b/res/layout/camera_control.xml index 54f46c5..6aba493 100644 --- a/res/layout/camera_control.xml +++ b/res/layout/camera_control.xml @@ -20,16 +20,8 @@ android:layout_height="match_parent" android:minWidth="76dp" android:background="@drawable/bg_camera_pattern"> - - <include layout="@layout/review_thumbnail"/> - <ImageButton android:id="@+id/btn_done" - style="@style/ReviewControlIcon" - android:layout_alignParentTop="true" - android:layout_centerHorizontal="true" - android:layout_marginTop="10dp" - android:src="@drawable/ic_menu_done_holo_light" - android:visibility="gone" - android:onClick="onDoneButtonClicked"/> + <include layout="@layout/review_thumbnail" /> + <include layout="@layout/review_control" /> <com.android.camera.ShutterButton android:id="@+id/shutter_button" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -37,25 +29,6 @@ android:scaleType="center" android:clickable="true" android:focusable="true" - android:background="@drawable/btn_shutter"/> - - <include layout="@layout/mode_picker"/> - <LinearLayout - android:orientation="vertical" - android:layout_alignParentBottom="true" - android:layout_centerHorizontal="true" - android:layout_height="wrap_content" - android:layout_width="wrap_content" - android:layout_marginBottom="10dp"> - <Button android:id="@+id/btn_retake" - android:text="@string/review_retake" - style="@style/ReviewControlIcon" - android:visibility="gone" - android:onClick="onRetakeButtonClicked" /> - <Button android:id="@+id/btn_cancel" - android:text="@string/review_cancel" - style="@style/ReviewControlIcon" - android:visibility="gone" - android:onClick="onCancelButtonClicked" /> - </LinearLayout> + android:background="@drawable/btn_shutter" /> + <include layout="@layout/mode_picker" /> </com.android.camera.ui.ControlPanelLayout> diff --git a/res/layout/preview_frame_video.xml b/res/layout/preview_frame_video.xml index 4164b41..a922c6a 100644 --- a/res/layout/preview_frame_video.xml +++ b/res/layout/preview_frame_video.xml @@ -41,10 +41,8 @@ android:paddingRight="2dp" android:visibility="gone"/> <ImageButton android:id="@+id/btn_play" - style="@style/ReviewControlIcon" - android:layout_centerInParent="true" + style="@style/ReviewPlayIcon" android:src="@drawable/btn_ic_review_play" - android:visibility="gone" android:onClick="onPlayButtonClicked"/> <ImageView android:id="@+id/review_image" android:layout_width="match_parent" diff --git a/res/layout/review_control.xml b/res/layout/review_control.xml new file mode 100644 index 0000000..22a5680 --- /dev/null +++ b/res/layout/review_control.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2011 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/review_control" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <ImageView android:id="@+id/btn_cancel" + style="@style/ReviewControlIcon" + android:visibility="gone" + android:layout_alignParentTop="true" + android:layout_marginTop="20dp" + android:onClick="onCancelButtonClicked" + android:src="@drawable/ic_menu_cancel_holo_light" /> + <ImageView android:id="@+id/btn_retake" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:clickable="true" + android:focusable="true" + android:visibility="gone" + android:onClick="onRetakeButtonClicked" + android:background="@drawable/btn_shutter_retake" /> + <ImageView android:id="@+id/btn_done" + style="@style/ReviewControlIcon" + android:visibility="gone" + android:layout_alignParentBottom="true" + android:layout_marginBottom="20dp" + android:onClick="onDoneButtonClicked" + android:src="@drawable/ic_menu_done_holo_light" /> +</RelativeLayout> diff --git a/res/values-w1024dp/styles.xml b/res/values-w1024dp/styles.xml index e5da857..5588ae5 100644 --- a/res/values-w1024dp/styles.xml +++ b/res/values-w1024dp/styles.xml @@ -23,12 +23,23 @@ <item name="android:layout_height">wrap_content</item> <item name="android:layout_width">wrap_content</item> <item name="android:gravity">center</item> + <item name="android:layout_alignParentLeft">true</item> + <item name="android:layout_marginLeft">50dp</item> + <item name="android:visibility">gone</item> + <item name="android:clickable">true</item> + <item name="android:focusable">true</item> + <item name="android:background">@drawable/bg_review_control</item> </style> <style name="ReviewControlIcon"> - <item name="android:layout_height">90dp</item> - <item name="android:layout_width">140dp</item> + <item name="android:layout_height">60dp</item> + <item name="android:layout_width">60dp</item> <item name="android:gravity">center</item> - <item name="android:layout_marginBottom">10dp</item> + </style> + <style name="ReviewControlText"> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:paddingRight">10dp</item> + <item name="android:textSize">16sp</item> </style> <style name="ReviewThumbnail"> <item name="android:layout_width">86dp</item> diff --git a/res/values/styles.xml b/res/values/styles.xml index 8076cc9..cbb6329 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -38,18 +38,19 @@ <item name="android:windowExitAnimation">@anim/on_screen_hint_exit</item> </style> <style name="ReviewControlIcon"> - <item name="android:layout_height">60dp</item> - <item name="android:layout_width">95dp</item> + <item name="android:layout_height">50dp</item> + <item name="android:layout_width">75dp</item> <item name="android:gravity">center</item> - <item name="android:layout_marginBottom">10dp</item> - <item name="android:padding">2dp</item> - <item name="android:textSize">12sp</item> + <item name="android:layout_centerHorizontal">true</item> + <item name="android:clickable">true</item> + <item name="android:focusable">true</item> + <item name="android:background">@drawable/bg_review_control</item> </style> - <style name="ReviewControlGroup"> - <item name="android:orientation">vertical</item> - <item name="android:gravity">top|center_horizontal</item> + <style name="ReviewPlayIcon"> <item name="android:layout_height">wrap_content</item> - <item name="android:layout_width">match_parent</item> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_centerInParent">true</item> + <item name="android:visibility">gone</item> </style> <style name="RecordingTime"> <item name="android:layout_width">wrap_content</item> diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 2ddcc56..8973bac 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -1268,7 +1268,6 @@ public class Camera extends ActivityBase implements FocusManager.Listener, mThumbnail.saveTo(new File(getFilesDir(), Thumbnail.LAST_THUMB_FILENAME)); } } - hidePostCaptureAlert(); } if (mDidRegister) { @@ -1768,8 +1767,8 @@ public class Camera extends ActivityBase implements FocusManager.Listener, private void showPostCaptureAlert() { if (mIsImageCaptureIntent) { - mShutterButton.setVisibility(View.GONE); - mIndicatorControlContainer.setVisibility(View.GONE); + Util.fadeOut(mIndicatorControlContainer); + Util.fadeOut(mShutterButton); int[] pickIds = {R.id.btn_retake, R.id.btn_done}; for (int id : pickIds) { @@ -1784,7 +1783,7 @@ public class Camera extends ActivityBase implements FocusManager.Listener, int[] pickIds = {R.id.btn_retake, R.id.btn_done}; for (int id : pickIds) { - (findViewById(id)).setVisibility(View.GONE); + Util.fadeOut(findViewById(id)); } Util.fadeIn(mShutterButton); diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java index aacf0ec..906dc1e 100644 --- a/src/com/android/camera/Util.java +++ b/src/com/android/camera/Util.java @@ -518,10 +518,21 @@ public class Util { } public static void fadeIn(View view) { + if (view.getVisibility() == View.VISIBLE) return; + view.setVisibility(View.VISIBLE); Animation animation = new AlphaAnimation(0F, 1F); - animation.setDuration(500); + animation.setDuration(400); + view.startAnimation(animation); + } + + public static void fadeOut(View view) { + if (view.getVisibility() != View.VISIBLE) return; + + Animation animation = new AlphaAnimation(1F, 0F); + animation.setDuration(400); view.startAnimation(animation); + view.setVisibility(View.GONE); } public static void setRotationParameter(Parameters parameters, int cameraId, int orientation) { diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index dcb0c23..d6a7e89 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -1593,8 +1593,8 @@ public class VideoCamera extends ActivityBase } } - mShutterButton.setVisibility(View.GONE); - mIndicatorControlContainer.setVisibility(View.GONE); + Util.fadeOut(mShutterButton); + Util.fadeOut(mIndicatorControlContainer); int[] pickIds = {R.id.btn_retake, R.id.btn_done, R.id.btn_play}; for (int id : pickIds) { Util.fadeIn(findViewById(id)); @@ -1608,7 +1608,7 @@ public class VideoCamera extends ActivityBase int[] pickIds = {R.id.btn_retake, R.id.btn_done, R.id.btn_play}; for (int id : pickIds) { - (findViewById(id)).setVisibility(View.GONE); + Util.fadeOut(findViewById(id)); } Util.fadeIn(mShutterButton); Util.fadeIn(mIndicatorControlContainer); |