summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-03-15 18:15:44 -0700
committernicolasroard <nicolasroard@google.com>2013-03-15 19:10:01 -0700
commit7e54986578fba76e2ad3aa86ef816afad45ea0d8 (patch)
treefab6b1009cd3d373cf01d4c1a2ecd06d9d2169e9
parent856b1d5b519f0bed32f5e95146e306248a18c288 (diff)
downloadandroid_packages_apps_Snap-7e54986578fba76e2ad3aa86ef816afad45ea0d8.tar.gz
android_packages_apps_Snap-7e54986578fba76e2ad3aa86ef816afad45ea0d8.tar.bz2
android_packages_apps_Snap-7e54986578fba76e2ad3aa86ef816afad45ea0d8.zip
Add new slider style
Change-Id: I3c749058b6432765b5c8d8d39d26dc4467437ddf
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_control_disabled.pngbin0 -> 3731 bytes
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_control_focused.pngbin0 -> 4071 bytes
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_control_normal.pngbin0 -> 4337 bytes
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_control_pressed.pngbin0 -> 4867 bytes
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_primary.9.pngbin0 -> 2874 bytes
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_secondary.9.pngbin0 -> 2866 bytes
-rw-r--r--res/drawable-xhdpi/filtershow_scrubber_track.9.pngbin0 -> 174 bytes
-rw-r--r--res/drawable/filtershow_scrubber.xml22
-rw-r--r--res/drawable/filtershow_slider.xml28
-rw-r--r--res/layout/filtershow_editor_panel.xml10
-rw-r--r--res/values/filtershow_styles.xml13
11 files changed, 69 insertions, 4 deletions
diff --git a/res/drawable-xhdpi/filtershow_scrubber_control_disabled.png b/res/drawable-xhdpi/filtershow_scrubber_control_disabled.png
new file mode 100644
index 000000000..f7ba38f41
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_control_disabled.png
Binary files differ
diff --git a/res/drawable-xhdpi/filtershow_scrubber_control_focused.png b/res/drawable-xhdpi/filtershow_scrubber_control_focused.png
new file mode 100644
index 000000000..d40136c52
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_control_focused.png
Binary files differ
diff --git a/res/drawable-xhdpi/filtershow_scrubber_control_normal.png b/res/drawable-xhdpi/filtershow_scrubber_control_normal.png
new file mode 100644
index 000000000..877935dec
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_control_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/filtershow_scrubber_control_pressed.png b/res/drawable-xhdpi/filtershow_scrubber_control_pressed.png
new file mode 100644
index 000000000..216aaf8e4
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_control_pressed.png
Binary files differ
diff --git a/res/drawable-xhdpi/filtershow_scrubber_primary.9.png b/res/drawable-xhdpi/filtershow_scrubber_primary.9.png
new file mode 100644
index 000000000..aae37aa14
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_primary.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/filtershow_scrubber_secondary.9.png b/res/drawable-xhdpi/filtershow_scrubber_secondary.9.png
new file mode 100644
index 000000000..defea536c
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_secondary.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/filtershow_scrubber_track.9.png b/res/drawable-xhdpi/filtershow_scrubber_track.9.png
new file mode 100644
index 000000000..bfb204815
--- /dev/null
+++ b/res/drawable-xhdpi/filtershow_scrubber_track.9.png
Binary files differ
diff --git a/res/drawable/filtershow_scrubber.xml b/res/drawable/filtershow_scrubber.xml
new file mode 100644
index 000000000..744d1dad2
--- /dev/null
+++ b/res/drawable/filtershow_scrubber.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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_enabled="false" android:drawable="@drawable/filtershow_scrubber_control_disabled" />
+ <item android:state_pressed="true" android:drawable="@drawable/filtershow_scrubber_control_pressed" />
+ <item android:state_selected="true" android:drawable="@drawable/filtershow_scrubber_control_focused" />
+ <item android:drawable="@drawable/filtershow_scrubber_control_normal" />
+</selector> \ No newline at end of file
diff --git a/res/drawable/filtershow_slider.xml b/res/drawable/filtershow_slider.xml
new file mode 100644
index 000000000..23457a6ef
--- /dev/null
+++ b/res/drawable/filtershow_slider.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:id="@android:id/background"
+ android:drawable="@drawable/filtershow_scrubber_track" />
+ <item android:id="@android:id/secondaryProgress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/filtershow_scrubber_secondary" />
+ </item>
+ <item android:id="@android:id/progress">
+ <scale android:scaleWidth="100%"
+ android:drawable="@drawable/filtershow_scrubber_primary" />
+ </item>
+</layer-list> \ No newline at end of file
diff --git a/res/layout/filtershow_editor_panel.xml b/res/layout/filtershow_editor_panel.xml
index 8560a5bf1..ffe5d48b8 100644
--- a/res/layout/filtershow_editor_panel.xml
+++ b/res/layout/filtershow_editor_panel.xml
@@ -26,7 +26,7 @@
<LinearLayout
android:id="@+id/controlArea"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="64dp"
android:layout_weight="1"
android:orientation="horizontal"
android:visibility="visible" >
@@ -35,7 +35,9 @@
android:id="@+id/primarySeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1" />
+ android:layout_weight="1"
+ style="@style/FilterShowSlider" />
+
</LinearLayout>
<LinearLayout
@@ -50,7 +52,7 @@
android:id="@+id/cancelFilter"
android:layout_width="wrap_content"
android:layout_height="94dip"
- android:layout_gravity="left"
+ android:layout_gravity="left|center_vertical"
android:layout_weight=".1"
android:background="@android:color/transparent"
android:gravity="center"
@@ -91,7 +93,7 @@
android:id="@+id/applyFilter"
android:layout_width="wrap_content"
android:layout_height="94dip"
- android:layout_gravity="right"
+ android:layout_gravity="right|center_vertical"
android:layout_weight=".1"
android:background="@android:color/transparent"
android:gravity="center"
diff --git a/res/values/filtershow_styles.xml b/res/values/filtershow_styles.xml
index 4600eebd5..4162ccde9 100644
--- a/res/values/filtershow_styles.xml
+++ b/res/values/filtershow_styles.xml
@@ -52,4 +52,17 @@
<item name="android:scaleType">centerInside</item>
</style>
+ <style name="FilterShowSlider">
+ <item name="android:indeterminateOnly">false</item>
+ <item name="android:progressDrawable">@drawable/filtershow_slider</item>
+ <item name="android:indeterminateDrawable">@drawable/filtershow_slider</item>
+ <item name="android:minHeight">13dip</item>
+ <item name="android:maxHeight">13dip</item>
+ <item name="android:thumb">@drawable/filtershow_scrubber</item>
+ <item name="android:thumbOffset">16dip</item>
+ <item name="android:focusable">true</item>
+ <item name="android:paddingStart">16dip</item>
+ <item name="android:paddingEnd">16dip</item>
+ </style>
+
</resources> \ No newline at end of file