1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8  http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<!-- A dummy wrapper layout so we can set the layout direction of the LinearLayout
17     without impacting its positioning in a parent view group with a potentially different
18     layout direction.
19     Please note that even though most layouts mirror in RTL, playback controls should not be
20     mirrored as they do not refer to the direction of time.
21     For more details see
22     https://material.io/design/usability/bidirectionality.html#mirroring-elements -->
23<FrameLayout
24    xmlns:android="http://schemas.android.com/apk/res/android"
25    android:layout_width="match_parent"
26    android:layout_height="@dimen/control_bar_height">
27
28    <LinearLayout
29        android:id="@+id/buttons_container"
30        android:layout_width="match_parent"
31        android:layout_height="match_parent"
32        android:orientation="horizontal"
33        android:layoutDirection="ltr">
34
35        <ImageButton
36            android:id="@+id/back_button"
37            android:layout_gravity="center_vertical"
38            android:layout_width="@dimen/control_button_size"
39            android:layout_height="@dimen/control_button_size"
40            android:layout_weight="@integer/playback_controls_back_button_weight"
41            android:src="@drawable/ic_skip_previous"
42            android:background="@drawable/playback_button_background"
43            style="@style/RadioButton" />
44
45        <com.android.car.radio.widget.PlayPauseButton
46            android:id="@+id/play_button"
47            android:layout_gravity="center_vertical"
48            android:layout_width="@dimen/control_button_size"
49            android:layout_height="@dimen/control_button_size"
50            android:layout_weight="@integer/playback_controls_play_button_weight"
51            android:stateListAnimator="@anim/fab_state_list_animator"
52            android:src="@drawable/ic_play_pause_stop"
53            android:scaleType="center"
54            android:background="@drawable/playback_button_background"
55            android:tint="@color/playback_controls_play_button_color"/>
56
57        <ImageButton
58            android:id="@+id/forward_button"
59            android:layout_gravity="center_vertical"
60            android:layout_width="@dimen/control_button_size"
61            android:layout_height="@dimen/control_button_size"
62            android:layout_weight="@integer/playback_controls_forward_button_weight"
63            android:src="@drawable/ic_skip_next"
64            android:background="@drawable/playback_button_background"
65            style="@style/RadioButton" />
66
67        <ImageButton
68            android:id="@+id/add_presets_button"
69            android:layout_gravity="center_vertical"
70            android:layout_width="@dimen/control_button_size"
71            android:layout_height="@dimen/control_button_size"
72            android:layout_weight="@integer/playback_controls_presets_button_weight"
73            android:src="@drawable/ic_star_empty"
74            android:background="@drawable/playback_button_background"
75            style="@style/RadioButton" />
76    </LinearLayout>
77</FrameLayout>
78