• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2     Copyright (C) 2015 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<FrameLayout
17    xmlns:android="http://schemas.android.com/apk/res/android"
18    android:layout_width="wrap_content"
19    android:layout_height="wrap_content"
20    android:background="@android:color/transparent"
21    android:theme="@style/qs_theme">
22    <!-- right-aligned to be physically near volume button -->
23    <LinearLayout
24        android:id="@+id/volume_dialog"
25        android:minWidth="@dimen/volume_dialog_panel_width"
26        android:layout_width="wrap_content"
27        android:layout_height="wrap_content"
28        android:layout_gravity="center_vertical|right"
29        android:background="@android:color/transparent"
30        android:paddingRight="@dimen/volume_dialog_panel_transparent_padding_right"
31        android:paddingTop="@dimen/volume_dialog_panel_transparent_padding"
32        android:paddingBottom="@dimen/volume_dialog_panel_transparent_padding"
33        android:paddingLeft="@dimen/volume_dialog_panel_transparent_padding"
34        android:orientation="vertical"
35        android:clipToPadding="false" >
36
37        <FrameLayout
38            android:id="@+id/ringer"
39            android:layout_width="@dimen/volume_dialog_ringer_size"
40            android:layout_height="@dimen/volume_dialog_ringer_size"
41            android:layout_marginBottom="@dimen/volume_dialog_spacer"
42            android:translationZ="@dimen/volume_dialog_elevation"
43            android:layout_gravity="right"
44            android:clipToPadding="false"
45            android:background="@drawable/rounded_bg_full">
46            <com.android.keyguard.AlphaOptimizedImageButton
47                android:id="@+id/ringer_icon"
48                style="@style/VolumeButtons"
49                android:background="@drawable/rounded_ripple"
50                android:layout_width="match_parent"
51                android:layout_height="match_parent"
52                android:tint="@color/accent_tint_color_selector"
53                android:layout_gravity="center"
54                android:soundEffectsEnabled="false" />
55
56            <include layout="@layout/volume_dnd_icon"
57                     android:layout_width="match_parent"
58                     android:layout_height="wrap_content"
59                     android:layout_marginRight="@dimen/volume_dialog_stream_padding"
60                     android:layout_marginTop="6dp"/>
61        </FrameLayout>
62
63        <LinearLayout
64            android:id="@+id/main"
65            android:layout_width="wrap_content"
66            android:minWidth="@dimen/volume_dialog_panel_width"
67            android:layout_height="wrap_content"
68            android:orientation="vertical"
69            android:translationZ="@dimen/volume_dialog_elevation"
70            android:clipToPadding="false"
71            android:background="@drawable/rounded_bg_full" >
72            <LinearLayout
73                android:id="@+id/volume_dialog_rows"
74                android:layout_width="wrap_content"
75                android:layout_height="wrap_content"
76                android:minWidth="@dimen/volume_dialog_panel_width"
77                android:gravity="center"
78                android:orientation="horizontal"
79                android:paddingRight="@dimen/volume_dialog_stream_padding"
80                android:paddingLeft="@dimen/volume_dialog_stream_padding">
81                    <!-- volume rows added and removed here! :-) -->
82            </LinearLayout>
83            <FrameLayout
84                android:id="@+id/settings_container"
85                android:layout_width="match_parent"
86                android:layout_height="wrap_content"
87                android:background="@drawable/rounded_bg_bottom_background">
88                <com.android.keyguard.AlphaOptimizedImageButton
89                    android:id="@+id/settings"
90                    android:src="@drawable/ic_settings_16dp"
91                    android:layout_width="@dimen/volume_dialog_tap_target_size"
92                    android:layout_height="@dimen/volume_dialog_tap_target_size"
93                    android:layout_gravity="center"
94                    android:contentDescription="@string/accessibility_volume_settings"
95                    android:background="@drawable/ripple_drawable_20dp"
96                    android:tint="?android:attr/textColorSecondary"
97                    android:soundEffectsEnabled="false" />
98            </FrameLayout>
99        </LinearLayout>
100
101    </LinearLayout>
102</FrameLayout>