diff options
author | Chung-yih Wang <cywang@google.com> | 2011-08-15 12:43:23 +0800 |
---|---|---|
committer | Chung-yih Wang <cywang@google.com> | 2011-08-17 15:25:00 +0800 |
commit | adab2bddc93bf4af535cb58e7167bf8690d97d8c (patch) | |
tree | 1d6a716948dd84f35282529172d2c7e5fecbf781 /res | |
parent | 383a2b45820ff710627dbd536f1bd683e393e335 (diff) | |
download | packages_apps_LegacyCamera-adab2bddc93bf4af535cb58e7167bf8690d97d8c.zip packages_apps_LegacyCamera-adab2bddc93bf4af535cb58e7167bf8690d97d8c.tar.gz packages_apps_LegacyCamera-adab2bddc93bf4af535cb58e7167bf8690d97d8c.tar.bz2 |
Add Sprung Lever Zoom Control for Phone UI.
bug:5083780
Change-Id: I5b29f6bc509fc93ed74175e2754ce9f3c4afe27f
Diffstat (limited to 'res')
32 files changed, 141 insertions, 19 deletions
diff --git a/res/anim/grow_fade_in_from_bottom.xml b/res/anim/grow_fade_in_from_bottom.xml new file mode 100644 index 0000000..df5bdf4 --- /dev/null +++ b/res/anim/grow_fade_in_from_bottom.xml @@ -0,0 +1,26 @@ +<?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. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> + <scale android:interpolator="@android:interpolator/decelerate_quint" + android:fromXScale="1.0" android:toXScale="1.0" + android:fromYScale="0.2" android:toYScale="1.0" + android:pivotX="100%" android:pivotY="100%" + android:duration="300" /> + <alpha android:interpolator="@android:interpolator/decelerate_cubic" + android:fromAlpha="0.5" android:toAlpha="1.0" + android:duration="300" /> +</set> diff --git a/res/anim/shrink_fade_out_from_top.xml b/res/anim/shrink_fade_out_from_top.xml new file mode 100644 index 0000000..4df151c --- /dev/null +++ b/res/anim/shrink_fade_out_from_top.xml @@ -0,0 +1,26 @@ +<?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. +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"> + <scale android:interpolator="@android:interpolator/decelerate_quint" + android:fromXScale="1.0" android:toXScale="1.0" + android:fromYScale="1.0" android:toYScale="0.2" + android:pivotX="100%" android:pivotY="100%" + android:duration="300" /> + <alpha android:interpolator="@android:interpolator/decelerate_cubic" + android:fromAlpha="1.0" android:toAlpha="0.0" + android:duration="300" /> +</set> diff --git a/res/drawable-hdpi/btn_close_settings.png b/res/drawable-hdpi/btn_close_settings.png Binary files differnew file mode 100644 index 0000000..3774aea --- /dev/null +++ b/res/drawable-hdpi/btn_close_settings.png diff --git a/res/drawable-hdpi/btn_zoom_control.png b/res/drawable-hdpi/btn_zoom_control.png Binary files differnew file mode 100644 index 0000000..b9c1c98 --- /dev/null +++ b/res/drawable-hdpi/btn_zoom_control.png diff --git a/res/drawable-hdpi/ic_rotate_camera_facing_back.png b/res/drawable-hdpi/ic_rotate_camera_facing_back.png Binary files differnew file mode 100644 index 0000000..cca4636 --- /dev/null +++ b/res/drawable-hdpi/ic_rotate_camera_facing_back.png diff --git a/res/drawable-hdpi/ic_rotate_camera_facing_forward.png b/res/drawable-hdpi/ic_rotate_camera_facing_forward.png Binary files differnew file mode 100644 index 0000000..6def0c7 --- /dev/null +++ b/res/drawable-hdpi/ic_rotate_camera_facing_forward.png diff --git a/res/drawable-hdpi/ic_settings_holo_light.png b/res/drawable-hdpi/ic_settings_holo_light.png Binary files differnew file mode 100644 index 0000000..24d074c --- /dev/null +++ b/res/drawable-hdpi/ic_settings_holo_light.png diff --git a/res/drawable-hdpi/ic_zoom_big.9.png b/res/drawable-hdpi/ic_zoom_big.9.png Binary files differnew file mode 100644 index 0000000..22425ca --- /dev/null +++ b/res/drawable-hdpi/ic_zoom_big.9.png diff --git a/res/drawable-hdpi/ic_zoom_in_holo_light.png b/res/drawable-hdpi/ic_zoom_in_holo_light.png Binary files differnew file mode 100644 index 0000000..df1e925 --- /dev/null +++ b/res/drawable-hdpi/ic_zoom_in_holo_light.png diff --git a/res/drawable-hdpi/ic_zoom_out_holo_light.png b/res/drawable-hdpi/ic_zoom_out_holo_light.png Binary files differnew file mode 100644 index 0000000..5ce6c42 --- /dev/null +++ b/res/drawable-hdpi/ic_zoom_out_holo_light.png diff --git a/res/drawable-hdpi/ic_zoom_slider.png b/res/drawable-hdpi/ic_zoom_slider.png Binary files differnew file mode 100644 index 0000000..606fc30 --- /dev/null +++ b/res/drawable-hdpi/ic_zoom_slider.png diff --git a/res/drawable-hdpi/ic_zoom_slider_pressed.png b/res/drawable-hdpi/ic_zoom_slider_pressed.png Binary files differnew file mode 100644 index 0000000..af55061 --- /dev/null +++ b/res/drawable-hdpi/ic_zoom_slider_pressed.png diff --git a/res/drawable-mdpi/ic_rotate_camera_facing_back.png b/res/drawable-mdpi/ic_rotate_camera_facing_back.png Binary files differnew file mode 100644 index 0000000..0adc8bd --- /dev/null +++ b/res/drawable-mdpi/ic_rotate_camera_facing_back.png diff --git a/res/drawable-mdpi/ic_rotate_camera_facing_forward.png b/res/drawable-mdpi/ic_rotate_camera_facing_forward.png Binary files differnew file mode 100644 index 0000000..bb373af --- /dev/null +++ b/res/drawable-mdpi/ic_rotate_camera_facing_forward.png diff --git a/res/drawable-mdpi/ic_settings_holo_light.png b/res/drawable-mdpi/ic_settings_holo_light.png Binary files differnew file mode 100644 index 0000000..dba8990 --- /dev/null +++ b/res/drawable-mdpi/ic_settings_holo_light.png diff --git a/res/drawable-mdpi/ic_zoom_in_holo_light.png b/res/drawable-mdpi/ic_zoom_in_holo_light.png Binary files differnew file mode 100644 index 0000000..0d22534 --- /dev/null +++ b/res/drawable-mdpi/ic_zoom_in_holo_light.png diff --git a/res/drawable-mdpi/ic_zoom_out_holo_light.png b/res/drawable-mdpi/ic_zoom_out_holo_light.png Binary files differnew file mode 100644 index 0000000..9cb7c3d --- /dev/null +++ b/res/drawable-mdpi/ic_zoom_out_holo_light.png diff --git a/res/drawable-mdpi/ic_zoom_slider.png b/res/drawable-mdpi/ic_zoom_slider.png Binary files differnew file mode 100644 index 0000000..359dae2 --- /dev/null +++ b/res/drawable-mdpi/ic_zoom_slider.png diff --git a/res/drawable-mdpi/ic_zoom_slider_pressed.png b/res/drawable-mdpi/ic_zoom_slider_pressed.png Binary files differnew file mode 100644 index 0000000..14acd6a --- /dev/null +++ b/res/drawable-mdpi/ic_zoom_slider_pressed.png diff --git a/res/drawable-xhdpi/ic_rotate_camera_facing_back.png b/res/drawable-xhdpi/ic_rotate_camera_facing_back.png Binary files differnew file mode 100644 index 0000000..1caf7e7 --- /dev/null +++ b/res/drawable-xhdpi/ic_rotate_camera_facing_back.png diff --git a/res/drawable-xhdpi/ic_rotate_camera_facing_forward.png b/res/drawable-xhdpi/ic_rotate_camera_facing_forward.png Binary files differnew file mode 100644 index 0000000..46ce681 --- /dev/null +++ b/res/drawable-xhdpi/ic_rotate_camera_facing_forward.png diff --git a/res/drawable-xhdpi/ic_settings_holo_light.png b/res/drawable-xhdpi/ic_settings_holo_light.png Binary files differnew file mode 100644 index 0000000..3a5d0ba --- /dev/null +++ b/res/drawable-xhdpi/ic_settings_holo_light.png diff --git a/res/drawable-xhdpi/ic_zoom_in_holo_light.png b/res/drawable-xhdpi/ic_zoom_in_holo_light.png Binary files differnew file mode 100644 index 0000000..07ba15f --- /dev/null +++ b/res/drawable-xhdpi/ic_zoom_in_holo_light.png diff --git a/res/drawable-xhdpi/ic_zoom_out_holo_light.png b/res/drawable-xhdpi/ic_zoom_out_holo_light.png Binary files differnew file mode 100644 index 0000000..f6a5d3a --- /dev/null +++ b/res/drawable-xhdpi/ic_zoom_out_holo_light.png diff --git a/res/drawable-xhdpi/ic_zoom_slider.png b/res/drawable-xhdpi/ic_zoom_slider.png Binary files differnew file mode 100644 index 0000000..441220c --- /dev/null +++ b/res/drawable-xhdpi/ic_zoom_slider.png diff --git a/res/drawable-xhdpi/ic_zoom_slider_pressed.png b/res/drawable-xhdpi/ic_zoom_slider_pressed.png Binary files differnew file mode 100644 index 0000000..be1f7ee --- /dev/null +++ b/res/drawable-xhdpi/ic_zoom_slider_pressed.png diff --git a/res/drawable/btn_zoom_slider.xml b/res/drawable/btn_zoom_slider.xml new file mode 100644 index 0000000..6ecdf19 --- /dev/null +++ b/res/drawable/btn_zoom_slider.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/ic_zoom_slider_pressed" /> + <item android:drawable="@drawable/ic_zoom_slider" /> +</selector> + diff --git a/res/layout-w1024dp/camera_control.xml b/res/layout-w1024dp/camera_control.xml index 342d167..9897dc6 100644 --- a/res/layout-w1024dp/camera_control.xml +++ b/res/layout-w1024dp/camera_control.xml @@ -40,6 +40,11 @@ android:clickable="true" android:focusable="true" android:background="@drawable/btn_shutter" /> + <com.android.camera.ui.ZoomPicker + android:id="@+id/zoom_control" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="gone"/> <com.android.camera.ui.RotateImageView android:id="@+id/zoom_increment" android:clickable="true" android:layout_width="wrap_content" diff --git a/res/layout/camera_control.xml b/res/layout/camera_control.xml index 6347f3c..ea9c3fe 100644 --- a/res/layout/camera_control.xml +++ b/res/layout/camera_control.xml @@ -24,13 +24,13 @@ <include layout="@layout/review_thumbnail"/> <com.android.camera.ui.CameraPicker android:id="@+id/camera_picker" - android:clickable="true" - android:layout_centerVertical="true" - android:layout_centerHorizontal="true" - android:layout_below="@+id/share_button" - android:layout_above="@+id/shutter_button" - android:layout_width="36dp" - android:layout_height="36dp" /> + android:clickable="true" + android:layout_centerVertical="true" + android:layout_centerHorizontal="true" + android:layout_below="@+id/share_button" + android:layout_above="@+id/shutter_button" + android:layout_width="36dp" + android:layout_height="36dp" /> <!-- need fixed size of the view since the source icon(HDPI) will be too large for phones --> <com.android.camera.ShutterButton android:id="@+id/shutter_button" diff --git a/res/layout/indicator_bar.xml b/res/layout/indicator_bar.xml new file mode 100644 index 0000000..b3d8c09 --- /dev/null +++ b/res/layout/indicator_bar.xml @@ -0,0 +1,54 @@ +<?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. +--> +<com.android.camera.ui.IndicatorControlContainer xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/indicator_control" + android:layout_width="48dp" + android:layout_height="match_parent" + android:layout_marginTop="6dp" + android:layout_marginRight="6dp" + android:layout_marginBottom="6dp" + android:clickable="true" + android:layout_alignParentRight="true"> + <com.android.camera.ui.IndicatorBar + android:id="@+id/indicator_bar" + android:layout_width="match_parent" + android:layout_height="match_parent"> + <ImageView + android:id="@+id/zoom_control_icon" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:src="@drawable/btn_zoom_control" + android:visibility="gone" /> + <com.android.camera.ui.RotateImageView + android:id="@+id/second_level_indicator_bar_icon" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:src="@drawable/ic_settings_holo_light" /> + </com.android.camera.ui.IndicatorBar> + + <com.android.camera.ui.ZoomControlBar + android:id="@+id/zoom_control" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="gone" /> + <com.android.camera.ui.SecondLevelIndicatorBar + android:id="@+id/second_level_indicator_bar" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:visibility="gone" /> +</com.android.camera.ui.IndicatorControlContainer> diff --git a/res/layout/preview_frame.xml b/res/layout/preview_frame.xml index 63887ff..1bf621a 100644 --- a/res/layout/preview_frame.xml +++ b/res/layout/preview_frame.xml @@ -53,12 +53,7 @@ android:layout_alignParentBottom="true" android:layout_margin="5dp" android:visibility="gone"/> - <com.android.camera.ui.IndicatorBar - android:id="@+id/indicator_control" - android:layout_width="48dp" - android:layout_height="match_parent" - android:layout_centerVertical="true" - android:layout_alignParentRight="true"/> <include layout="@layout/tap_to_focus_toast"/> + <include layout="@layout/indicator_bar" /> </RelativeLayout> </com.android.camera.PreviewFrameLayout> diff --git a/res/layout/preview_frame_video.xml b/res/layout/preview_frame_video.xml index 32154cd..abfd026 100644 --- a/res/layout/preview_frame_video.xml +++ b/res/layout/preview_frame_video.xml @@ -49,11 +49,6 @@ android:layout_height="match_parent" android:visibility="gone" android:background="@android:color/black" /> - <com.android.camera.ui.IndicatorBar - android:id="@+id/indicator_control" - android:layout_width="48dp" - android:layout_height="match_parent" - android:layout_centerVertical="true" - android:layout_alignParentRight="true"/> + <include layout="@layout/indicator_bar" /> </RelativeLayout> </com.android.camera.PreviewFrameLayout> |