1 <?xml version="1.0" encoding="utf-8"?> 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 17 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 android:layout_width="fill_parent" 19 android:layout_height="wrap_content" 20 android:minHeight="48dp" 21 android:gravity="center_vertical" 22 android:paddingLeft="24dp" 23 android:paddingRight="12dp" 24 android:splitMotionEvents="false"> 25 <ImageView 26 android:layout_width="24dp" 27 android:layout_height="24dp" 28 android:src="?attr/mediaRouteAudioTrackDrawable" 29 android:gravity="center" 30 android:scaleType="center"/> 31 <!-- Since dialog's top layout mr_expandable_area is clickable, it propagates pressed state 32 to its non-clickable children. Specify android:clickable="true" to prevent volume slider 33 from having false pressed state. --> 34 <android.support.v7.app.MediaRouteVolumeSlider 35 android:id="@+id/mr_volume_slider" 36 android:layout_width="0dp" 37 android:layout_height="wrap_content" 38 android:minHeight="48dp" 39 android:maxHeight="48dp" 40 android:layout_weight="1" 41 android:clickable="true" 42 android:contentDescription="@string/mr_controller_volume_slider" /> 43 <android.support.v7.app.MediaRouteExpandCollapseButton 44 android:id="@+id/mr_group_expand_collapse" 45 android:layout_width="48dp" 46 android:layout_height="48dp" 47 android:padding="12dp" 48 android:background="?attr/selectableItemBackgroundBorderless" 49 android:visibility="gone"/> 50 </LinearLayout> 51