1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2016 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 <com.android.car.media.util.widgets.MusicPanelLayout 17 xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:id="@+id/music_panel" 20 android:layout_width="match_parent" 21 android:layout_height="@dimen/action_panel_height" 22 android:elevation="@dimen/music_panel_elevation" 23 android:layout_gravity="bottom" 24 android:visibility="gone" 25 app:cardCornerRadius="@dimen/car_card_view_corner_radius" > 26 <LinearLayout 27 android:id="@+id/controls" 28 android:layout_width="match_parent" 29 android:layout_height="match_parent" 30 android:orientation="horizontal" 31 android:background="@color/car_card" 32 android:gravity="center" > 33 <ImageButton 34 android:id="@+id/play_queue" 35 android:visibility="invisible" 36 android:layout_width="@dimen/controls_tap_target_width" 37 android:layout_height="@dimen/controls_tap_target_height" 38 android:layout_marginLeft="@dimen/controls_margin" 39 android:background="@drawable/music_action_background" 40 android:tint="@color/car_tint" /> 41 <Space 42 android:layout_width="@dimen/controls_spacing_outer" 43 android:layout_height="match_parent" /> 44 <ImageButton 45 android:id="@+id/prev" 46 android:visibility="invisible" 47 android:layout_width="@dimen/controls_tap_target_width" 48 android:layout_height="@dimen/controls_tap_target_height" 49 android:background="@drawable/music_action_background" 50 android:tint="@color/car_tint"/> 51 <Space 52 android:layout_width="@dimen/controls_spacing_inner" 53 android:layout_height="match_parent"/> 54 <!-- The id is on the FrameLayout because it is used as the click handler to take 55 advantage of the larger touch target size --> 56 <FrameLayout 57 android:id="@+id/play_pause_container" 58 android:layout_width="@dimen/controls_tap_target_width" 59 android:layout_height="@dimen/controls_tap_target_height"> 60 <com.android.car.media.util.widgets.PlayPauseStopImageView 61 android:id="@+id/play_pause" 62 android:layout_width="@dimen/stream_fab_size" 63 android:layout_height="@dimen/stream_fab_size" 64 android:layout_gravity="center" 65 android:scaleType="centerInside" 66 android:src="@drawable/ic_play_pause_stop" 67 android:focusable="true" 68 android:elevation="@dimen/play_pause_elevation" 69 android:stateListAnimator="@anim/car_fab_state_list_animator" /> 70 <ProgressBar 71 android:id="@+id/spinner" 72 android:layout_width="match_parent" 73 android:layout_height="match_parent" 74 android:padding="9dp" 75 android:indeterminateDrawable="@drawable/music_buffering" 76 android:visibility="gone" /> 77 </FrameLayout> 78 <Space 79 android:layout_width="@dimen/controls_spacing_inner" 80 android:layout_height="match_parent"/> 81 <ImageButton 82 android:id="@+id/next" 83 android:visibility="invisible" 84 android:layout_width="@dimen/controls_tap_target_width" 85 android:layout_height="@dimen/controls_tap_target_height" 86 android:background="@drawable/music_action_background" 87 android:tint="@color/car_tint" /> 88 <Space 89 android:layout_width="@dimen/controls_spacing_outer" 90 android:layout_height="match_parent" /> 91 <ImageButton 92 android:id="@+id/overflow_on" 93 android:visibility="invisible" 94 android:layout_width="@dimen/controls_tap_target_width" 95 android:layout_height="@dimen/controls_tap_target_height" 96 android:layout_marginRight="@dimen/controls_margin" 97 android:background="@drawable/music_action_background" 98 android:tint="@color/car_tint" /> 99 </LinearLayout> 100 <LinearLayout 101 android:id="@+id/overflow_items" 102 android:layout_width="match_parent" 103 android:layout_height="match_parent" 104 android:orientation="horizontal" 105 android:background="@color/car_card" 106 android:gravity="center" 107 android:visibility="gone" 108 android:alpha="0.0" > 109 <ImageButton 110 android:id="@+id/custom_action_1" 111 android:visibility="invisible" 112 android:layout_width="@dimen/controls_tap_target_width" 113 android:layout_height="@dimen/controls_tap_target_height" 114 android:layout_marginLeft="@dimen/overflow_margin" 115 android:background="@drawable/music_overflow_action_background" 116 android:tint="@color/car_tint_light" /> 117 <Space 118 android:layout_width="@dimen/overflow_spacing_outer" 119 android:layout_height="match_parent" /> 120 <ImageButton 121 android:id="@+id/custom_action_2" 122 android:visibility="invisible" 123 android:layout_width="@dimen/controls_tap_target_width" 124 android:layout_height="@dimen/controls_tap_target_height" 125 android:background="@drawable/music_overflow_action_background" 126 android:tint="@color/car_tint_light" /> 127 <Space 128 android:layout_width="@dimen/overflow_spacing_inner" 129 android:layout_height="match_parent" /> 130 <ImageButton 131 android:id="@+id/custom_action_3" 132 android:visibility="invisible" 133 android:layout_width="@dimen/controls_tap_target_width" 134 android:layout_height="@dimen/controls_tap_target_height" 135 android:background="@drawable/music_overflow_action_background" 136 android:tint="@color/car_tint_light" /> 137 <Space 138 android:layout_width="@dimen/overflow_spacing_inner" 139 android:layout_height="match_parent" /> 140 <ImageButton 141 android:id="@+id/custom_action_4" 142 android:visibility="invisible" 143 android:layout_width="@dimen/controls_tap_target_width" 144 android:layout_height="@dimen/controls_tap_target_height" 145 android:background="@drawable/music_overflow_action_background" 146 android:tint="@color/car_tint_light" /> 147 <Space 148 android:layout_width="@dimen/overflow_spacing_outer" 149 android:layout_height="match_parent" /> 150 <ImageButton 151 android:id="@+id/overflow_off" 152 android:layout_width="@dimen/controls_tap_target_width" 153 android:layout_height="@dimen/controls_tap_target_height" 154 android:layout_marginRight="@dimen/overflow_margin" 155 android:background="@drawable/music_overflow_action_background" 156 android:tint="@color/car_tint_light" /> 157 </LinearLayout> 158 <SeekBar 159 android:id="@+id/seek_bar" 160 android:layout_width="match_parent" 161 android:layout_height="@dimen/seek_bar_height" 162 android:layout_gravity="top" 163 android:focusable="false" 164 android:paddingStart="0dp" 165 android:paddingEnd="0dp" 166 android:progressDrawable="@drawable/seekbar_background" 167 android:thumb="@null" /> 168 </com.android.car.media.util.widgets.MusicPanelLayout> 169