chromium/chrome/browser/readaloud/android/java/res/layout/readaloud_expanded_player_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2023 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/readaloud_expanded_player"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <!-- Drag handlebar. -->
    <ImageView
        android:id="@+id/drag_handlebar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/readaloud_sheet_drag_bar_margin"
        android:layout_marginBottom="@dimen/readaloud_sheet_drag_bar_margin"
        android:layout_gravity="center_horizontal|top"
        android:importantForAccessibility="no"
        android:src="@drawable/drag_handlebar" />

    <!-- Scroll view in case the player is taller than the screen. -->
    <ScrollView
        android:id="@+id/scroll_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <!-- Container for scrolling. -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <!-- Error layout. -->
            <LinearLayout
                android:id="@+id/error_layout"
                android:gravity="center"
                android:layout_width="match_parent"
                android:layout_height="@dimen/error_layour_portrait_height"
                android:orientation="vertical">
                <LinearLayout
                    android:layout_width="289dp"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:layout_gravity="center"
                    android:gravity="center"
                    android:orientation="vertical"
                    android:paddingBottom="24dp">
                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="24dp"
                        android:layout_gravity="center"
                        android:src="@drawable/error_24"
                        android:clickable="false"
                        android:focusable="false"
                        android:importantForAccessibility="no"/>

                    <!-- Error message -->
                    <TextView
                        android:id="@+id/error_message"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingVertical="4dp"
                        android:text="@string/readaloud_expanded_playback_error"
                        android:textAppearance="@style/TextAppearance.Headline2"
                        android:textAlignment="center"
                        android:clickable="false"
                        android:focusable="false"
                        android:ellipsize="none"/>
                    <TextView
                        android:id="@+id/error_message"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/readaloud_expanded_playback_error_description"
                        android:textAppearance="@style/TextAppearance.TextMedium"
                        android:paddingVertical="4dp"
                        android:textAlignment="center"
                        android:clickable="false"
                        android:focusable="false"
                        android:ellipsize="none"/>
                </LinearLayout>
            </LinearLayout>

            <!-- Normal layout. -->
            <LinearLayout
                android:id="@+id/normal_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginHorizontal="@dimen/readaloud_expanded_player_margin_horizontal"
                android:layout_marginBottom="@dimen/readaloud_expanded_player_margin_bottom"
                android:orientation="vertical">
                <TextView
                    android:id="@+id/chrome_now_playing_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:layout_marginTop="@dimen/readaloud_now_playing_spacing_portrait"
                    android:text="@string/readaloud_chrome_now_playing"
                    android:textAppearance="@style/TextAppearance.TextMedium.Secondary"/>
                <!-- Title. -->
                <TextView
                    android:id="@+id/readaloud_expanded_player_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginVertical="@dimen/readaloud_expanded_player_title_margin_vertical"
                    android:layout_gravity="center_horizontal"
                    android:textAppearance="@style/TextAppearance.Headline2Thick.Primary"
                    android:ellipsize="end"
                    android:maxLines="1"/>

                <!-- Publisher button. -->
                <LinearLayout
                    android:id="@+id/readaloud_player_publisher_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_gravity="center_horizontal"
                    android:background="@drawable/secondary_gray_rounded">
                    <TextView
                        android:id="@+id/readaloud_expanded_player_publisher"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/readaloud_expanded_player_publisher_margin_left"
                        android:layout_marginVertical="@dimen/readaloud_expanded_player_publisher_margin_vertical"
                        android:textAppearance="@style/TextAppearance.TextMedium.Primary"
                        android:ellipsize="end"
                        android:maxLines="1"/>
                    <ImageView
                        android:layout_width="@dimen/readaloud_expanded_player_publisher_chevron_width"
                        android:layout_height="@dimen/readaloud_expanded_player_publisher_chevron_height"
                        android:layout_marginHorizontal="@dimen/readaloud_expanded_player_publisher_chevron_margin_horizontal"
                        android:layout_marginVertical="@dimen/readaloud_expanded_player_publisher_chevron_margin_vertical"
                        android:src="@drawable/chevron_right"
                        android:importantForAccessibility="no"/>
                </LinearLayout>

                <!-- Seek bar and times. -->
                <SeekBar
                    android:id="@+id/readaloud_expanded_player_seek_bar"
                    android:layout_marginTop="@dimen/readaloud_expanded_player_seek_bar_margin_top"
                    android:paddingTop="@dimen/readaloud_expanded_player_seek_bar_vertical_padding"
                    android:paddingBottom="@dimen/readaloud_expanded_player_seek_bar_vertical_padding"
                    android:paddingEnd="2dp"
                    android:paddingStart="2dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:max="1000"
                    android:progress="0"
                    android:maxHeight="@dimen/readaloud_expanded_player_seek_bar_height"
                    android:progressDrawable="@drawable/seekbar_style"
                    android:thumb="@drawable/scrubber_select_handle"
                    android:splitTrack="false"
                    android:contentDescription="@string/readaloud_seek_bar"/>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                    <TextView
                        android:id="@+id/readaloud_player_time"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="0"
                        android:textAppearance="@style/TextAppearance.TextSmall.Primary"
                        android:importantForAccessibility="no"/>
                    <View
                        android:layout_width="fill_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"/>
                    <TextView
                        android:id="@+id/readaloud_player_duration"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="0"
                        android:textAppearance="@style/TextAppearance.TextSmall.Primary"
                        android:importantForAccessibility="no"/>
                </LinearLayout>

                <!-- Speed menu, playback controls and overflow menu. -->
                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <LinearLayout
                        android:id="@+id/readaloud_playback_controls"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerInParent="true"
                        android:paddingBottom="60dp"
                        android:layout_gravity="center_horizontal">
                           <ImageView
                              android:id="@+id/readaloud_seek_back_button"
                              android:layout_width="@dimen/readaloud_control_button_diameter"
                              android:layout_height="@dimen/readaloud_control_button_diameter"
                              android:src="@drawable/replay_10_button"
                              android:background="@drawable/rounded_ripple"
                              android:contentDescription="@string/readaloud_replay"/>
                          <ImageView
                              android:id="@+id/readaloud_play_pause_button"
                              android:layout_width="@dimen/readaloud_play_button_width"
                              android:layout_height="@dimen/readaloud_control_button_diameter"
                              android:layout_marginHorizontal="@dimen/readaloud_control_button_spacing"
                              android:src="@drawable/play_button"
                              android:background="@drawable/rounded_ripple"
                              android:contentDescription="@string/readaloud_play"/>
                          <ImageView
                              android:id="@+id/readaloud_seek_forward_button"
                              android:layout_width="@dimen/readaloud_control_button_diameter"
                              android:layout_height="@dimen/readaloud_control_button_diameter"
                              android:src="@drawable/forward_10_button"
                              android:background="@drawable/rounded_ripple"
                              android:contentDescription="@string/readaloud_forward"/>
                    </LinearLayout>
                    <TextView
                        android:id="@+id/readaloud_playback_speed"
                        android:layout_width="wrap_content"
                        android:maxLines="1"
                        android:layout_height="@dimen/readaloud_menu_buttons_width"
                        android:layout_alignParentLeft="true"
                        android:layout_alignParentBottom="true"
                        android:textAppearance="@style/TextAppearance.TextAccentMediumThick"
                        tools:ignore="ContentDescription" />
                    <!-- Note: contentDescription for playback speed button above is set in ExpandedPlayerSheetContent.java. -->
                    <ImageView
                        android:id="@+id/readaloud_more_button"
                        android:layout_width="@dimen/readaloud_menu_buttons_width"
                        android:layout_height="@dimen/readaloud_menu_buttons_width"
                        android:layout_alignParentRight="true"
                        android:src="@drawable/baseline_more_horiz_24"
                        android:layout_alignParentBottom="true"
                        android:contentDescription="@string/readaloud_options_menu_button"/>
                </RelativeLayout>
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</LinearLayout>