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