78 lines
3.6 KiB
XML
78 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2018 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<!-- A dummy wrapper layout so we can set the layout direction of the LinearLayout
|
|
without impacting its positioning in a parent view group with a potentially different
|
|
layout direction.
|
|
Please note that even though most layouts mirror in RTL, playback controls should not be
|
|
mirrored as they do not refer to the direction of time.
|
|
For more details see
|
|
https://material.io/design/usability/bidirectionality.html#mirroring-elements -->
|
|
<FrameLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/control_bar_height">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/buttons_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal"
|
|
android:layoutDirection="ltr">
|
|
|
|
<ImageButton
|
|
android:id="@+id/back_button"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_width="@dimen/control_button_size"
|
|
android:layout_height="@dimen/control_button_size"
|
|
android:layout_weight="@integer/playback_controls_back_button_weight"
|
|
android:src="@drawable/ic_skip_previous"
|
|
android:background="@drawable/playback_button_background"
|
|
style="@style/RadioButton" />
|
|
|
|
<com.android.car.radio.widget.PlayPauseButton
|
|
android:id="@+id/play_button"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_width="@dimen/control_button_size"
|
|
android:layout_height="@dimen/control_button_size"
|
|
android:layout_weight="@integer/playback_controls_play_button_weight"
|
|
android:stateListAnimator="@anim/fab_state_list_animator"
|
|
android:src="@drawable/ic_play_pause_stop"
|
|
android:scaleType="center"
|
|
android:background="@drawable/playback_button_background"
|
|
android:tint="@color/playback_controls_play_button_color"/>
|
|
|
|
<ImageButton
|
|
android:id="@+id/forward_button"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_width="@dimen/control_button_size"
|
|
android:layout_height="@dimen/control_button_size"
|
|
android:layout_weight="@integer/playback_controls_forward_button_weight"
|
|
android:src="@drawable/ic_skip_next"
|
|
android:background="@drawable/playback_button_background"
|
|
style="@style/RadioButton" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/add_presets_button"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_width="@dimen/control_button_size"
|
|
android:layout_height="@dimen/control_button_size"
|
|
android:layout_weight="@integer/playback_controls_presets_button_weight"
|
|
android:src="@drawable/ic_star_empty"
|
|
android:background="@drawable/playback_button_background"
|
|
style="@style/RadioButton" />
|
|
</LinearLayout>
|
|
</FrameLayout>
|