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 73 <include layout="@layout/volume_dnd_icon" 74 android:layout_width="match_parent" 75 android:layout_height="wrap_content" 76 android:layout_marginRight="@dimen/volume_dialog_stream_padding" 77 android:layout_marginTop="6dp"/> 78 </FrameLayout> 79 80 <LinearLayout 81 android:id="@+id/volume_dialog_rows_container" 82 android:layout_width="wrap_content" 83 android:layout_height="wrap_content" 84 android:gravity="right" 85 android:layout_gravity="right" 86 android:orientation="vertical" 87 android:clipChildren="false" 88 android:clipToPadding="false" > 89 <LinearLayout 90 android:id="@+id/volume_dialog_rows" 91 android:layout_width="wrap_content" 92 android:layout_height="wrap_content" 93 android:gravity="center" 94 android:orientation="horizontal"> 95 <!-- volume rows added and removed here! :-) --> 96 </LinearLayout> 97 <FrameLayout 98 android:id="@+id/settings_container" 99 android:layout_width="wrap_content" 100 android:layout_height="wrap_content" 101 android:background="@drawable/volume_background_bottom" 102 android:paddingLeft="@dimen/volume_dialog_ringer_rows_padding" 103 android:paddingBottom="@dimen/volume_dialog_ringer_rows_padding" 104 android:paddingRight="@dimen/volume_dialog_ringer_rows_padding"> 105 <com.android.keyguard.AlphaOptimizedImageButton 106 android:id="@+id/settings" 107 android:src="@drawable/horizontal_ellipsis" 108 android:layout_width="@dimen/volume_dialog_tap_target_size" 109 android:layout_height="@dimen/volume_dialog_tap_target_size" 110 android:layout_gravity="center" 111 android:contentDescription="@string/accessibility_volume_settings" 112 android:background="@drawable/ripple_drawable_20dp" 113 android:tint="?androidprv:attr/colorAccent" 114 android:soundEffectsEnabled="false" /> 115 </FrameLayout> 116 </LinearLayout> 117 118 </LinearLayout> 119 120 <FrameLayout 121 android:id="@+id/odi_captions" 122 android:layout_width="@dimen/volume_dialog_caption_size" 123 android:layout_height="@dimen/volume_dialog_caption_size" 124 android:layout_marginTop="@dimen/volume_dialog_row_margin_bottom" 125 android:gravity="right" 126 android:layout_gravity="right" 127 android:clipToPadding="false" 128 android:clipToOutline="true" 129 android:background="@drawable/volume_row_rounded_background"> 130 <com.android.systemui.volume.CaptionsToggleImageButton 131 android:id="@+id/odi_captions_icon" 132 android:src="@drawable/ic_volume_odi_captions_disabled" 133 style="@style/VolumeButtons" 134 android:layout_width="match_parent" 135 android:layout_height="match_parent" 136 android:tint="?android:attr/colorAccent" 137 android:layout_gravity="center" 138 android:soundEffectsEnabled="false"/> 139 </FrameLayout> 140 </LinearLayout> 141 142 <ViewStub 143 android:id="@+id/odi_captions_tooltip_stub" 144 android:inflatedId="@+id/odi_captions_tooltip_view" 145 android:layout="@layout/volume_tool_tip_view" 146 android:layout_width="wrap_content" 147 android:layout_height="wrap_content" 148 android:layout_gravity="bottom | right" 149 android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/> 150 151</FrameLayout>