diff options
author | Wu-cheng Li <wuchengli@google.com> | 2010-10-04 20:35:34 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2010-10-06 17:21:28 +0800 |
commit | c5019f4d58412da6227b3f2e6461bba5b7c671a3 (patch) | |
tree | 7dd6069c58588803fbacb41dceb4c8ec84f84191 /res | |
parent | e6da834b082439299bb60529e690845e14dfdbc4 (diff) | |
download | LegacyCamera-c5019f4d58412da6227b3f2e6461bba5b7c671a3.zip LegacyCamera-c5019f4d58412da6227b3f2e6461bba5b7c671a3.tar.gz LegacyCamera-c5019f4d58412da6227b3f2e6461bba5b7c671a3.tar.bz2 |
Add zoom picker for xlarge layout.
The zoom of on-screen controls is not created if zoom picker
exists.
Change-Id: I229108aa8bc3eac7175acec46e14240627c7da7c
Diffstat (limited to 'res')
-rwxr-xr-x | res/drawable-mdpi/zoompicker_down_normal.9.png | bin | 0 -> 795 bytes | |||
-rwxr-xr-x | res/drawable-mdpi/zoompicker_down_pressed.9.png | bin | 0 -> 1161 bytes | |||
-rwxr-xr-x | res/drawable-mdpi/zoompicker_up_normal.9.png | bin | 0 -> 989 bytes | |||
-rwxr-xr-x | res/drawable-mdpi/zoompicker_up_pressed.9.png | bin | 0 -> 1433 bytes | |||
-rw-r--r-- | res/drawable/btn_zoom_picker_down.xml | 20 | ||||
-rw-r--r-- | res/drawable/btn_zoom_picker_up.xml | 20 | ||||
-rw-r--r-- | res/layout-xlarge/camera_control.xml | 11 | ||||
-rw-r--r-- | res/layout-xlarge/zoom_picker.xml | 43 | ||||
-rw-r--r-- | res/values/colors.xml | 1 | ||||
-rw-r--r-- | res/values/strings.xml | 2 |
10 files changed, 97 insertions, 0 deletions
diff --git a/res/drawable-mdpi/zoompicker_down_normal.9.png b/res/drawable-mdpi/zoompicker_down_normal.9.png Binary files differnew file mode 100755 index 0000000..f17e8f9 --- /dev/null +++ b/res/drawable-mdpi/zoompicker_down_normal.9.png diff --git a/res/drawable-mdpi/zoompicker_down_pressed.9.png b/res/drawable-mdpi/zoompicker_down_pressed.9.png Binary files differnew file mode 100755 index 0000000..777bcf5 --- /dev/null +++ b/res/drawable-mdpi/zoompicker_down_pressed.9.png diff --git a/res/drawable-mdpi/zoompicker_up_normal.9.png b/res/drawable-mdpi/zoompicker_up_normal.9.png Binary files differnew file mode 100755 index 0000000..dcd26e0 --- /dev/null +++ b/res/drawable-mdpi/zoompicker_up_normal.9.png diff --git a/res/drawable-mdpi/zoompicker_up_pressed.9.png b/res/drawable-mdpi/zoompicker_up_pressed.9.png Binary files differnew file mode 100755 index 0000000..7dac778 --- /dev/null +++ b/res/drawable-mdpi/zoompicker_up_pressed.9.png diff --git a/res/drawable/btn_zoom_picker_down.xml b/res/drawable/btn_zoom_picker_down.xml new file mode 100644 index 0000000..38f1270 --- /dev/null +++ b/res/drawable/btn_zoom_picker_down.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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/zoompicker_down_pressed" /> + <item android:drawable="@drawable/zoompicker_down_normal" /> +</selector> diff --git a/res/drawable/btn_zoom_picker_up.xml b/res/drawable/btn_zoom_picker_up.xml new file mode 100644 index 0000000..0a2249b --- /dev/null +++ b/res/drawable/btn_zoom_picker_up.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2008 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/zoompicker_up_pressed" /> + <item android:drawable="@drawable/zoompicker_up_normal" /> +</selector> diff --git a/res/layout-xlarge/camera_control.xml b/res/layout-xlarge/camera_control.xml index b30ac3c..91e11ce 100644 --- a/res/layout-xlarge/camera_control.xml +++ b/res/layout-xlarge/camera_control.xml @@ -36,6 +36,17 @@ android:gravity="center"> </ListView> + <ViewStub android:id="@+id/zoom_stub" + android:inflatedId="@+id/zoom_picker" + android:layout="@layout/zoom_picker" + android:layout_alignParentTop="true" + android:layout_alignParentRight="true" + android:layout_toRightOf="@id/image_list" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:layout_centerInParent="true"/> + <com.android.camera.ShutterButton android:id="@+id/shutter_button" android:layout_centerInParent="true" android:layout_alignParentRight="true" diff --git a/res/layout-xlarge/zoom_picker.xml b/res/layout-xlarge/zoom_picker.xml new file mode 100644 index 0000000..50766d4 --- /dev/null +++ b/res/layout-xlarge/zoom_picker.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +** +** Copyright 2010, 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.ZoomPicker xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView android:id="@+id/zoom_ratio" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:singleLine="true" + android:textColor="@android:color/white" + android:textSize="24dp" /> + + <Button android:id="@+id/increment" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:background="@drawable/btn_zoom_picker_up" /> + + <Button android:id="@+id/decrement" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/btn_zoom_picker_down" /> +</com.android.camera.ZoomPicker> diff --git a/res/values/colors.xml b/res/values/colors.xml index 7193b7c..c5572ca 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -20,4 +20,5 @@ <resources> <color name="recording_time_elapsed_text">#FFFFFFFF</color> <color name="recording_time_remaining_text">#FFFF0033</color> + <color name="zoom_picker_btn_pressed">#FFFFAD00</color> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 0d8d19a..a39461a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -361,6 +361,8 @@ <!-- The title show on the zoom controller --> <string name="zoom_control_title">Zoom</string> + <string name="zoom_increment" translable="false">+</string> + <string name="zoom_decrement" translable="false">-</string> <string name="switch_to_camera_lable">Switch to camera</string> <string name="switch_to_video_lable">Switch to video</string> |