<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:viewBindingIgnore="true"
    xmlns:tools="http://schemas.android.com/tools"
    tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">

    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/voice_note_player_play_pause_toggle"
        android:layout_width="36dp"
        android:layout_height="0dp"
        android:layout_marginStart="6dp"
        android:contentDescription="@string/VoiceNotePlayerView__pause_voice_message"
        android:padding="10dp"
        app:layout_constraintBottom_toBottomOf="@id/voice_note_player_info"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/voice_note_player_info"
        app:lottie_colorFilter="@color/signal_colorOnSurface"
        app:lottie_rawRes="@raw/lottie_play_pause"
        tools:background="@color/signal_alert_primary" />

    <org.thoughtcrime.securesms.components.emoji.EmojiTextView
        android:id="@+id/voice_note_player_info"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ellipsize="marquee"
        android:gravity="center_vertical"
        android:marqueeRepeatLimit="marquee_forever"
        android:minHeight="36dp"
        android:singleLine="true"
        android:textAppearance="@style/Signal.Text.BodyMedium"
        android:textColor="@color/signal_colorOnSurface"
        app:layout_constrainedWidth="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/voice_note_player_duration"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintStart_toEndOf="@id/voice_note_player_play_pause_toggle"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="Miles Morales Admiration Station" />

    <TextView
        android:id="@+id/voice_note_player_duration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:minHeight="36dp"
        android:paddingStart="4dp"
        android:paddingEnd="13dp"
        android:singleLine="true"
        android:textColor="@color/signal_colorOnSurface"
        android:textAppearance="@style/Signal.Text.BodyMedium"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/voice_note_player_speed_touch_target"
        app:layout_constraintStart_toEndOf="@id/voice_note_player_info"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="· 1:00" />

    <FrameLayout
        android:id="@+id/voice_note_player_speed_touch_target"
        android:layout_width="wrap_content"
        android:layout_height="36dp"
        android:layout_marginEnd="8dp"
        android:background="?selectableItemBackground"
        android:contentDescription="@string/VoiceNotePlayerView__change_voice_message_speed"
        android:minWidth="36dp"
        android:paddingStart="4dp"
        android:paddingEnd="4dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/voice_note_player_close"
        app:layout_constraintTop_toTopOf="parent">

        <org.thoughtcrime.securesms.components.PlaybackSpeedToggleTextView
            android:id="@+id/voice_note_player_speed"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:background="@drawable/round_background"
            android:gravity="center"
            android:minWidth="30dp"
            android:minHeight="20dp"
            android:paddingStart="4dp"
            android:paddingEnd="4dp"
            android:textAppearance="@style/Signal.Text.LabelMedium"
            android:textColor="@color/signal_colorOnSurfaceVariant"
            app:backgroundTint="@color/signal_colorTransparentInverse1"
            tools:text="1x" />
    </FrameLayout>

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/voice_note_player_close"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_marginEnd="4dp"
        android:contentDescription="@string/VoiceNotePlayerView__stop_voice_message"
        android:scaleType="centerInside"
        app:layout_constraintBottom_toBottomOf="@id/voice_note_player_info"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@id/voice_note_player_info"
        app:srcCompat="@drawable/ic_x_20"
        app:tint="@color/signal_colorOnSurface" />

</merge>