<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:contentDescription="@string/audio_placeholder"
    android:minHeight="52dp"
    tools:background="@color/bubble_receive">

    <ch.threema.app.ui.ControllerView
        android:id="@+id/controller"
        android:layout_width="@dimen/avatar_size_small"
        android:layout_height="@dimen/avatar_size_small"
        android:layout_centerVertical="true"
        android:layout_gravity="center" />

    <ch.threema.app.ui.AudioProgressBarView
        android:id="@+id/seek"
        style="@style/SeekBar.Audio"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_centerVertical="true"
        android:layout_marginLeft="50dp"
        android:layout_marginRight="10dp"
        android:layout_toLeftOf="@+id/document_size_view"
        android:enabled="false"
        android:paddingLeft="6dp"
        android:paddingRight="6dp"
        android:visibility="visible"
        app:barColor="@color/bubble_send_text_colorstatelist"
        app:barColorActivated="?attr/colorPrimary"
        app:barHeight="48dp"
        app:barMinHeight="2dp"
        app:barWidth="3dp"
        app:spaceWidth="2dp" />

    <TextView
        android:id="@+id/document_size_view"
        style="@style/Threema.Bubble.Text.Body.Small"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:layout_marginRight="4dp"
        android:layout_toLeftOf="@+id/speed_container"
        android:text="00:00" />

    <FrameLayout
        android:id="@+id/speed_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_centerVertical="true"
        android:minWidth="56dp">

        <com.google.android.material.chip.Chip
            android:id="@+id/read_on_button"
            style="@style/Threema.Chip.AudioMessage"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:visibility="gone"
            tools:text="1.5x" />

        <ImageView
            android:id="@+id/audio_message_icon"
            android:layout_width="@dimen/avatar_size_small"
            android:layout_height="@dimen/avatar_size_small"
            android:layout_gravity="center_vertical|right"
            android:clickable="false"
            android:focusable="false"
            android:importantForAccessibility="no"
            android:padding="8dp"
            app:srcCompat="@drawable/ic_microphone_outline" />

    </FrameLayout>

</RelativeLayout>
