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 <android.support.v7.widget.CardView 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 <FrameLayout 55 android:id="@+id/play_pause_container" 56 android:layout_width="wrap_content" 57 android:layout_height="wrap_content"> 58 <com.android.car.media.util.widgets.PlayPauseStopImageView 59 android:id="@+id/play_pause" 60 android:layout_width="@dimen/stream_fab_size" 61 android:layout_height="@dimen/stream_fab_size" 62 android:layout_gravity="center" 63 android:scaleType="centerInside" 64 android:src="@drawable/ic_play_pause_stop" 65 android:focusable="true" 66 android:elevation="@dimen/play_pause_elevation" 67 android:stateListAnimator="@anim/car_fab_state_list_animator" /> 68 <ProgressBar 69 android:id="@+id/spinner" 70 android:layout_width="match_parent" 71 android:layout_height="match_parent" 72 android:padding="9dp" 73 android:indeterminateDrawable="@drawable/music_buffering" 74 android:visibility="gone" /> 75 </FrameLayout> 76 <Space 77 android:layout_width="@dimen/controls_spacing_inner" 78 android:layout_height="match_parent"/> 79 <ImageButton 80 android:id="@+id/next" 81 android:visibility="invisible" 82 android:layout_width="@dimen/controls_tap_target_width" 83 android:layout_height="@dimen/controls_tap_target_height" 84 android:background="@drawable/music_action_background" 85 android:tint="@color/car_tint" /> 86 <Space 87 android:layout_width="@dimen/controls_spacing_outer" 88 android:layout_height="match_parent" /> 89 <ImageButton 90 android:id="@+id/overflow_on" 91 android:visibility="invisible" 92 android:layout_width="@dimen/controls_tap_target_width" 93 android:layout_height="@dimen/controls_tap_target_height" 94 android:layout_marginRight="@dimen/controls_margin" 95 android:background="@drawable/music_action_background" 96 android:tint="@color/car_tint" /> 97 </LinearLayout> 98 <LinearLayout 99 android:id="@+id/overflow_items" 100 android:layout_width="match_parent" 101 android:layout_height="match_parent" 102 android:orientation="horizontal" 103 android:background="@color/car_card" 104 android:gravity="center" 105 android:visibility="gone" 106 android:alpha="0.0" > 107 <ImageButton 108 android:id="@+id/custom_action_1" 109 android:visibility="invisible" 110 android:layout_width="@dimen/controls_tap_target_width" 111 android:layout_height="@dimen/controls_tap_target_height" 112 android:layout_marginLeft="@dimen/overflow_margin" 113 android:background="@drawable/music_overflow_action_background" 114 android:tint="@color/car_tint_light" /> 115 <Space 116 android:layout_width="@dimen/overflow_spacing_outer" 117 android:layout_height="match_parent" /> 118 <ImageButton 119 android:id="@+id/custom_action_2" 120 android:visibility="invisible" 121 android:layout_width="@dimen/controls_tap_target_width" 122 android:layout_height="@dimen/controls_tap_target_height" 123 android:background="@drawable/music_overflow_action_background" 124 android:tint="@color/car_tint_light" /> 125 <Space 126 android:layout_width="@dimen/overflow_spacing_inner" 127 android:layout_height="match_parent" /> 128 <ImageButton 129 android:id="@+id/custom_action_3" 130 android:visibility="invisible" 131 android:layout_width="@dimen/controls_tap_target_width" 132 android:layout_height="@dimen/controls_tap_target_height" 133 android:background="@drawable/music_overflow_action_background" 134 android:tint="@color/car_tint_light" /> 135 <Space 136 android:layout_width="@dimen/overflow_spacing_inner" 137 android:layout_height="match_parent" /> 138 <ImageButton 139 android:id="@+id/custom_action_4" 140 android:visibility="invisible" 141 android:layout_width="@dimen/controls_tap_target_width" 142 android:layout_height="@dimen/controls_tap_target_height" 143 android:background="@drawable/music_overflow_action_background" 144 android:tint="@color/car_tint_light" /> 145 <Space 146 android:layout_width="@dimen/overflow_spacing_outer" 147 android:layout_height="match_parent" /> 148 <ImageButton 149 android:id="@+id/overflow_off" 150 android:layout_width="@dimen/controls_tap_target_width" 151 android:layout_height="@dimen/controls_tap_target_height" 152 android:layout_marginRight="@dimen/overflow_margin" 153 android:background="@drawable/music_overflow_action_background" 154 android:tint="@color/car_tint_light" /> 155 </LinearLayout> 156 <SeekBar 157 android:id="@+id/seek_bar" 158 android:layout_width="match_parent" 159 android:layout_height="@dimen/seek_bar_height" 160 android:layout_gravity="top" 161 android:focusable="false" 162 android:paddingStart="0dp" 163 android:paddingEnd="0dp" 164 android:progressDrawable="@drawable/seekbar_background" 165 android:thumb="@null" /> 166 </android.support.v7.widget.CardView> 167