• 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    xmlns:sysui="http://schemas.android.com/apk/res-auto"
19    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
20    android:id="@+id/volume_dialog_container"
21    android:layout_width="wrap_content"
22    android:layout_height="wrap_content"
23    android:gravity="right"
24    android:layout_gravity="right"
25    android:clipToPadding="false"
26    android:theme="@style/volume_dialog_theme">
27
28    <!-- right-aligned to be physically near volume button -->
29    <LinearLayout
30        android:id="@+id/volume_dialog"
31        android:layout_width="wrap_content"
32        android:layout_height="wrap_content"
33        android:gravity="right"
34        android:layout_gravity="right"
35        android:layout_marginRight="@dimen/volume_dialog_panel_transparent_padding_right"
36        android:orientation="vertical"
37        android:clipToPadding="false"
38        android:clipChildren="false">
39
40        <LinearLayout
41            android:id="@+id/volume_dialog_top_container"
42            android:layout_width="wrap_content"
43            android:layout_height="wrap_content"
44            android:clipChildren="false"
45            android:orientation="vertical"
46            android:gravity="right">
47
48            <include layout="@layout/volume_ringer_drawer" />
49
50            <FrameLayout
51                android:visibility="gone"
52                android:id="@+id/ringer"
53                android:layout_width="@dimen/volume_dialog_ringer_size"
54                android:layout_height="@dimen/volume_dialog_ringer_size"
55                android:layout_marginBottom="@dimen/volume_dialog_spacer"
56                android:gravity="right"
57                android:layout_gravity="right"
58                android:translationZ="@dimen/volume_dialog_elevation"
59                android:clipToPadding="false"
60                android:background="@drawable/rounded_bg_full">
61                <com.android.keyguard.AlphaOptimizedImageButton
62                    android:id="@+id/ringer_icon"
63                    style="@style/VolumeButtons"
64                    android:background="@drawable/rounded_ripple"
65                    android:layout_width="match_parent"
66                    android:layout_height="match_parent"
67                    android:scaleType="fitCenter"
68                    android:padding="@dimen/volume_dialog_ringer_icon_padding"
69                    android:tint="?android:attr/textColorPrimary"
70                    android:layout_gravity="center"
71                    android:soundEffectsEnabled="false" />
72            </FrameLayout>
73
74            <LinearLayout
75                android:id="@+id/volume_dialog_rows_container"
76                android:layout_width="wrap_content"
77                android:layout_height="wrap_content"
78                android:gravity="right"
79                android:layout_gravity="right"
80                android:orientation="vertical"
81                android:clipChildren="false"
82                android:clipToPadding="false" >
83                <LinearLayout
84                    android:id="@+id/volume_dialog_rows"
85                    android:layout_width="wrap_content"
86                    android:layout_height="wrap_content"
87                    android:gravity="center"
88                    android:orientation="horizontal">
89                        <!-- volume rows added and removed here! :-) -->
90                </LinearLayout>
91                <FrameLayout
92                    android:id="@+id/settings_container"
93                    android:layout_width="wrap_content"
94                    android:layout_height="wrap_content"
95                    android:background="@drawable/volume_background_bottom"
96                    android:paddingLeft="@dimen/volume_dialog_ringer_rows_padding"
97                    android:paddingBottom="@dimen/volume_dialog_ringer_rows_padding"
98                    android:paddingRight="@dimen/volume_dialog_ringer_rows_padding">
99                    <com.android.keyguard.AlphaOptimizedImageButton
100                        android:id="@+id/settings"
101                        android:src="@drawable/horizontal_ellipsis"
102                        android:layout_width="@dimen/volume_dialog_tap_target_size"
103                        android:layout_height="@dimen/volume_dialog_tap_target_size"
104                        android:layout_gravity="center"
105                        android:contentDescription="@string/accessibility_volume_settings"
106                        android:background="@drawable/ripple_drawable_20dp"
107                        android:tint="?androidprv:attr/colorAccent"
108                        android:soundEffectsEnabled="false" />
109                </FrameLayout>
110            </LinearLayout>
111
112        </LinearLayout>
113
114        <FrameLayout
115            android:id="@+id/odi_captions"
116            android:layout_width="@dimen/volume_dialog_caption_size"
117            android:layout_height="@dimen/volume_dialog_caption_size"
118            android:layout_marginTop="@dimen/volume_dialog_row_margin_bottom"
119            android:gravity="right"
120            android:layout_gravity="right"
121            android:clipToPadding="false"
122            android:clipToOutline="true"
123            android:background="@drawable/volume_row_rounded_background">
124            <com.android.systemui.volume.CaptionsToggleImageButton
125                android:id="@+id/odi_captions_icon"
126                android:src="@drawable/ic_volume_odi_captions_disabled"
127                style="@style/VolumeButtons"
128                android:layout_width="match_parent"
129                android:layout_height="match_parent"
130                android:tint="?android:attr/colorAccent"
131                android:layout_gravity="center"
132                android:soundEffectsEnabled="false"/>
133        </FrameLayout>
134    </LinearLayout>
135
136    <ViewStub
137        android:id="@+id/odi_captions_tooltip_stub"
138        android:inflatedId="@+id/odi_captions_tooltip_view"
139        android:layout="@layout/volume_tool_tip_view"
140        android:layout_width="wrap_content"
141        android:layout_height="wrap_content"
142        android:layout_gravity="bottom | right"
143        android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/>
144
145</FrameLayout>