diff options
author | Ji-Hwan Lee <jihwan@google.com> | 2014-04-21 21:05:35 +0900 |
---|---|---|
committer | Ji-Hwan Lee <jihwan@google.com> | 2014-04-21 21:08:06 +0900 |
commit | f0ea6d189cab17aadff765e3c7786a29e6fdfa7a (patch) | |
tree | a3323bbf6199ef0bc74b888517612aa7fd90f7c1 /overlay | |
parent | 8ce13af5c3c75bf4a16aed5ae190efe7034fc794 (diff) | |
download | android_device_google_atv-f0ea6d189cab17aadff765e3c7786a29e6fdfa7a.tar.gz android_device_google_atv-f0ea6d189cab17aadff765e3c7786a29e6fdfa7a.tar.bz2 android_device_google_atv-f0ea6d189cab17aadff765e3c7786a29e6fdfa7a.zip |
Add layout overlays for volume panel
Change-Id: I04d980e57b9823631917c287769f88ae9a9783ce
Diffstat (limited to 'overlay')
4 files changed, 136 insertions, 0 deletions
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 index 0000000..cdf3308 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/drawable/progress_volume.xml @@ -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 index 0000000..24a1d29 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/layout/volume_adjust.xml @@ -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 index 0000000..7c47527 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/layout/volume_adjust_item.xml @@ -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> diff --git a/overlay/frameworks/base/core/res/res/values/dimens.xml b/overlay/frameworks/base/core/res/res/values/dimens.xml index 95a85df..cf18d2b 100644 --- a/overlay/frameworks/base/core/res/res/values/dimens.xml +++ b/overlay/frameworks/base/core/res/res/values/dimens.xml @@ -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> |