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_legacy" /> 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:paddingBottom="@dimen/volume_dialog_ringer_rows_padding"> 97 <com.android.keyguard.AlphaOptimizedImageButton 98 android:id="@+id/settings" 99 android:src="@drawable/horizontal_ellipsis" 100 android:layout_width="@dimen/volume_dialog_tap_target_size" 101 android:layout_height="@dimen/volume_dialog_tap_target_size" 102 android:layout_gravity="center" 103 android:contentDescription="@string/accessibility_volume_settings" 104 android:background="@drawable/ripple_drawable_20dp" 105 android:tint="?androidprv:attr/colorAccent" 106 android:soundEffectsEnabled="false" /> 107 </FrameLayout> 108 </LinearLayout> 109 110 </LinearLayout> 111 112 <FrameLayout 113 android:id="@+id/odi_captions" 114 android:layout_width="@dimen/volume_dialog_caption_size" 115 android:layout_height="@dimen/volume_dialog_caption_size" 116 android:layout_marginTop="@dimen/volume_dialog_row_margin_bottom" 117 android:gravity="right" 118 android:layout_gravity="right" 119 android:clipToPadding="false" 120 android:clipToOutline="true" 121 android:background="@drawable/volume_row_rounded_background"> 122 <com.android.systemui.volume.CaptionsToggleImageButton 123 android:id="@+id/odi_captions_icon" 124 android:src="@drawable/ic_volume_odi_captions_disabled" 125 style="@style/VolumeButtons" 126 android:layout_width="match_parent" 127 android:layout_height="match_parent" 128 android:tint="?android:attr/colorAccent" 129 android:layout_gravity="center" 130 android:soundEffectsEnabled="false"/> 131 </FrameLayout> 132 </LinearLayout> 133 134 <ViewStub 135 android:id="@+id/odi_captions_tooltip_stub" 136 android:inflatedId="@+id/odi_captions_tooltip_view" 137 android:layout="@layout/volume_tool_tip_view" 138 android:layout_width="wrap_content" 139 android:layout_height="wrap_content" 140 android:layout_gravity="bottom | right" 141 android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/> 142 143</FrameLayout>