summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-11-18 17:59:58 +0800
committerHung-ying Tyan <tyanh@google.com>2010-11-24 17:37:14 +0800
commiteb1f0c8299d96bad9bb449ff9e13eff4b43272cc (patch)
treea8f78fb4623b5c89eb3af56fb2b695e2f574f6cf /res
parent677c81c916b4105131b395399b0a91d5eeb82935 (diff)
downloadpackages_apps_LegacyCamera-eb1f0c8299d96bad9bb449ff9e13eff4b43272cc.zip
packages_apps_LegacyCamera-eb1f0c8299d96bad9bb449ff9e13eff4b43272cc.tar.gz
packages_apps_LegacyCamera-eb1f0c8299d96bad9bb449ff9e13eff4b43272cc.tar.bz2
Highlight camera/video icon when mode is changed.
+ Make camera/video icons on switcher radio buttons instead of RotateImageView for x-large devices. + Add icons for camera and video on different states (normal and checked) for x-large devices. + Add SwitcherSet.java that consists of the radio buttons and the Switcher and replace the camera_switch_set linear layout with it. + Replace Switcher with SwitcherSet in Camera and VideoCamera. Bug: 3156677 Change-Id: I1ea7b4d4149d0a8dc548086150a9ae1a616cd8de
Diffstat (limited to 'res')
-rw-r--r--res/drawable-hdpi/btn_ic_mode_switch_camera.pngbin1014 -> 0 bytes
-rw-r--r--res/drawable-hdpi/btn_ic_mode_switch_camera_checked.pngbin0 -> 747 bytes
-rw-r--r--res/drawable-hdpi/btn_ic_mode_switch_camera_normal.png (renamed from res/drawable-mdpi/btn_ic_mode_switch_camera.png)bin694 -> 694 bytes
-rw-r--r--res/drawable-hdpi/btn_ic_mode_switch_video.pngbin752 -> 0 bytes
-rw-r--r--res/drawable-hdpi/btn_ic_mode_switch_video_checked.pngbin0 -> 482 bytes
-rw-r--r--res/drawable-hdpi/btn_ic_mode_switch_video_normal.png (renamed from res/drawable-mdpi/btn_ic_mode_switch_video.png)bin544 -> 544 bytes
-rw-r--r--res/drawable-mdpi/btn_ic_mode_switch_camera_checked.pngbin0 -> 747 bytes
-rw-r--r--res/drawable-mdpi/btn_ic_mode_switch_camera_normal.pngbin0 -> 817 bytes
-rw-r--r--res/drawable-mdpi/btn_ic_mode_switch_video_checked.pngbin0 -> 482 bytes
-rw-r--r--res/drawable-mdpi/btn_ic_mode_switch_video_normal.pngbin0 -> 525 bytes
-rw-r--r--res/drawable/btn_ic_mode_switch_camera.xml20
-rw-r--r--res/drawable/btn_ic_mode_switch_video.xml20
-rw-r--r--res/layout-xlarge/camera_control.xml18
-rw-r--r--res/layout/camera_control.xml6
14 files changed, 53 insertions, 11 deletions
diff --git a/res/drawable-hdpi/btn_ic_mode_switch_camera.png b/res/drawable-hdpi/btn_ic_mode_switch_camera.png
deleted file mode 100644
index ca53bb7..0000000
--- a/res/drawable-hdpi/btn_ic_mode_switch_camera.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_mode_switch_camera_checked.png b/res/drawable-hdpi/btn_ic_mode_switch_camera_checked.png
new file mode 100644
index 0000000..d64d636
--- /dev/null
+++ b/res/drawable-hdpi/btn_ic_mode_switch_camera_checked.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_mode_switch_camera.png b/res/drawable-hdpi/btn_ic_mode_switch_camera_normal.png
index b8b0df7..b8b0df7 100644
--- a/res/drawable-mdpi/btn_ic_mode_switch_camera.png
+++ b/res/drawable-hdpi/btn_ic_mode_switch_camera_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_mode_switch_video.png b/res/drawable-hdpi/btn_ic_mode_switch_video.png
deleted file mode 100644
index 09a2036..0000000
--- a/res/drawable-hdpi/btn_ic_mode_switch_video.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/btn_ic_mode_switch_video_checked.png b/res/drawable-hdpi/btn_ic_mode_switch_video_checked.png
new file mode 100644
index 0000000..9411f4c
--- /dev/null
+++ b/res/drawable-hdpi/btn_ic_mode_switch_video_checked.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_mode_switch_video.png b/res/drawable-hdpi/btn_ic_mode_switch_video_normal.png
index f31e9ff..f31e9ff 100644
--- a/res/drawable-mdpi/btn_ic_mode_switch_video.png
+++ b/res/drawable-hdpi/btn_ic_mode_switch_video_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_mode_switch_camera_checked.png b/res/drawable-mdpi/btn_ic_mode_switch_camera_checked.png
new file mode 100644
index 0000000..d64d636
--- /dev/null
+++ b/res/drawable-mdpi/btn_ic_mode_switch_camera_checked.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_mode_switch_camera_normal.png b/res/drawable-mdpi/btn_ic_mode_switch_camera_normal.png
new file mode 100644
index 0000000..a695238
--- /dev/null
+++ b/res/drawable-mdpi/btn_ic_mode_switch_camera_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_mode_switch_video_checked.png b/res/drawable-mdpi/btn_ic_mode_switch_video_checked.png
new file mode 100644
index 0000000..9411f4c
--- /dev/null
+++ b/res/drawable-mdpi/btn_ic_mode_switch_video_checked.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_ic_mode_switch_video_normal.png b/res/drawable-mdpi/btn_ic_mode_switch_video_normal.png
new file mode 100644
index 0000000..9758931
--- /dev/null
+++ b/res/drawable-mdpi/btn_ic_mode_switch_video_normal.png
Binary files differ
diff --git a/res/drawable/btn_ic_mode_switch_camera.xml b/res/drawable/btn_ic_mode_switch_camera.xml
new file mode 100644
index 0000000..adbd879
--- /dev/null
+++ b/res/drawable/btn_ic_mode_switch_camera.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_checked="true" android:drawable="@drawable/btn_ic_mode_switch_camera_checked" />
+ <item android:drawable="@drawable/btn_ic_mode_switch_camera_normal" />
+</selector>
diff --git a/res/drawable/btn_ic_mode_switch_video.xml b/res/drawable/btn_ic_mode_switch_video.xml
new file mode 100644
index 0000000..00f989d
--- /dev/null
+++ b/res/drawable/btn_ic_mode_switch_video.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_checked="true" android:drawable="@drawable/btn_ic_mode_switch_video_checked" />
+ <item android:drawable="@drawable/btn_ic_mode_switch_video_normal" />
+</selector>
diff --git a/res/layout-xlarge/camera_control.xml b/res/layout-xlarge/camera_control.xml
index 38c6200..961ae27 100644
--- a/res/layout-xlarge/camera_control.xml
+++ b/res/layout-xlarge/camera_control.xml
@@ -67,7 +67,7 @@
android:background="@drawable/btn_shutter" />
</com.android.camera.ui.IndicatorWheel>
- <LinearLayout android:id="@+id/camera_switch_set"
+ <com.android.camera.SwitcherSet android:id="@+id/camera_switch"
android:orientation="vertical"
android:gravity="center"
android:layout_height="150dp"
@@ -76,21 +76,23 @@
android:layout_alignParentLeft="true"
android:layout_marginLeft="21dp"
android:background="@drawable/mode_switch_bg_v2">
- <com.android.camera.RotateImageView android:id="@+id/video_switch_icon"
+ <RadioButton android:id="@+id/switch_off_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:src="@drawable/btn_ic_mode_switch_video"/>
- <com.android.camera.Switcher android:id="@+id/camera_switch"
+ android:button="@android:color/transparent"
+ android:background="@drawable/btn_ic_mode_switch_video"/>
+ <com.android.camera.Switcher android:id="@+id/switcher"
android:layout_width="wrap_content"
- android:layout_height="60dp"
+ android:layout_height="50dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:src="@drawable/btn_mode_switch_knob_v2"
android:background="@drawable/btn_mode_switch_bg_v2" />
- <com.android.camera.RotateImageView android:id="@+id/camera_switch_icon"
+ <RadioButton android:id="@+id/switch_on_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:src="@drawable/btn_ic_mode_switch_camera"/>
- </LinearLayout>
+ android:button="@android:color/transparent"
+ android:background="@drawable/btn_ic_mode_switch_camera"/>
+ </com.android.camera.SwitcherSet>
</com.android.camera.ui.ControlPanel>
diff --git a/res/layout/camera_control.xml b/res/layout/camera_control.xml
index c89418e..f4117a2 100644
--- a/res/layout/camera_control.xml
+++ b/res/layout/camera_control.xml
@@ -24,7 +24,7 @@
<include layout="@layout/review_thumbnail"/>
- <LinearLayout android:id="@+id/camera_switch_set"
+ <com.android.camera.SwitcherSet android:id="@+id/camera_switch"
android:orientation="vertical"
android:gravity="center"
android:layout_centerInParent="true"
@@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/btn_ic_mode_switch_video"/>
- <com.android.camera.Switcher android:id="@+id/camera_switch"
+ <com.android.camera.Switcher android:id="@+id/switcher"
android:layout_width="wrap_content"
android:layout_height="70dp"
android:src="@drawable/btn_mode_switch_knob"
@@ -45,7 +45,7 @@
android:layout_width="wrap_content"
android:layout_marginBottom="3dp"
android:src="@drawable/btn_ic_mode_switch_camera"/>
- </LinearLayout>
+ </com.android.camera.SwitcherSet>
<com.android.camera.ShutterButton android:id="@+id/shutter_button"
android:layout_alignParentBottom="true"