Add layout overlays for volume panel
Ji-Hwan Lee [Mon, 21 Apr 2014 12:05:35 +0000 (21:05 +0900)]
Change-Id: I04d980e57b9823631917c287769f88ae9a9783ce

overlay/frameworks/base/core/res/res/drawable/progress_volume.xml [new file with mode: 0644]
overlay/frameworks/base/core/res/res/layout/volume_adjust.xml [new file with mode: 0644]
overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml [new file with mode: 0644]
overlay/frameworks/base/core/res/res/values/dimens.xml

diff --git a/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml b/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml
new file mode 100644 (file)
index 0000000..cdf3308
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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">
+        <shape>
+            <solid android:color="#44ffffff" />
+        </shape>
+    </item>
+
+    <item android:id="@android:id/secondaryProgress">
+        <clip>
+            <shape>
+                <solid android:color="#44ffffff" />
+            </shape>
+        </clip>
+    </item>
+
+    <item android:id="@android:id/progress">
+        <clip>
+            <shape>
+                <solid android:color="#ff33b5e5" />
+            </shape>
+        </clip>
+    </item>
+
+</layer-list>
diff --git a/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml b/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml
new file mode 100644 (file)
index 0000000..24a1d29
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/visible_panel"
+    android:layout_width="480dp"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal">
+
+    <LinearLayout
+        android:id="@+id/slider_group"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical" />
+
+    <ImageView
+        android:id="@+id/expand_button_divider"
+        android:src="?attr/dividerVertical"
+        android:layout_width="wrap_content"
+        android:layout_height="32dp"
+        android:scaleType="fitXY"
+        android:layout_gravity="top"
+        android:layout_marginTop="16dp"
+        android:layout_marginBottom="16dp" />
+
+    <ImageView
+        android:id="@+id/expand_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="top"
+        android:padding="16dp"
+        android:background="?attr/selectableItemBackground"
+        android:src="@drawable/ic_sysbar_quicksettings" />
+
+</LinearLayout>
diff --git a/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml b/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml
new file mode 100644 (file)
index 0000000..7c47527
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="80dp"
+    android:orientation="horizontal"
+    android:layout_marginTop="8dp"
+    android:layout_marginBottom="8dp"
+    android:gravity="left|center_vertical">
+
+    <ImageView
+        android:id="@+id/stream_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:padding="16dp"
+        android:background="?attr/selectableItemBackground" />
+
+    <SeekBar
+        style="?android:attr/seekBarStyle"
+        android:progressDrawable="@android:drawable/progress_volume"
+        android:thumb="@null"
+        android:id="@+id/seekbar"
+        android:layout_width="0dp"
+        android:layout_height="48dp"
+        android:layout_weight="1"
+        android:padding="16dp"
+        android:layout_marginRight="16dp" />
+
+</LinearLayout>
index 95a85df..cf18d2b 100644 (file)
@@ -28,4 +28,7 @@
     <!-- Width of the navigation bar when it is placed vertically on the screen -->
     <dimen name="navigation_bar_width">42dp</dimen>
 
+    <!-- Volume panel y offset -->
+    <dimen name="volume_panel_top">400dp</dimen>
+
 </resources>