<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:fitsSystemWindows="true"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/iv_bg"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop" />

    <ai.guiji.duix.sdk.client.render.DUIXTextureView
        android:id="@+id/glTextureView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <TextView
        android:id="@+id/tvDebug"
        android:textSize="12sp"
        android:visibility="gone"
        android:textColor="@color/white"
        android:background="#66000000"
        android:padding="6dp"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_width="match_parent"
        android:layout_height="200dp"/>


    <androidx.appcompat.widget.SwitchCompat
        android:id="@+id/switchMute"
        android:text="@string/mute"
        android:layout_margin="12dp"
        android:enabled="false"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <TextView
        android:id="@+id/tvMotionTips"
        android:visibility="invisible"
        android:layout_margin="12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:text="@string/support_actions"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rvMotion"
        app:layout_constraintTop_toBottomOf="@+id/tvMotionTips"
        app:layout_constraintStart_toStartOf="parent"
        android:layout_marginStart="12dp"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
        android:orientation="vertical"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <Button
        android:id="@+id/btnRandomMotion"
        android:text="@string/random_play_action"
        android:textSize="13sp"
        android:visibility="invisible"
        android:textColor="@color/white"
        app:layout_constraintTop_toBottomOf="@+id/rvMotion"
        app:layout_constraintStart_toStartOf="parent"
        android:background="@drawable/shape_common_btn"
        android:layout_margin="6dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <TextView
        android:id="@+id/tvSubtitle"
        android:text=""
        android:textSize="16sp"
        android:textColor="@color/white"
        android:shadowColor="#1a1e1f"
        android:shadowRadius="4"
        android:gravity="center"
        android:visibility="gone"
        android:background="#99000000"
        android:padding="12dp"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/btnAIConversation"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginHorizontal="24dp"
        android:layout_marginBottom="12dp"
        />

    <Button
        android:id="@+id/btnAIConversation"
        android:text="@string/ai_fab_start"
        android:textSize="14sp"
        android:textColor="@color/white"
        android:background="@drawable/shape_circle_fab"
        android:elevation="8dp"
        android:layout_width="56dp"
        android:layout_height="56dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginBottom="32dp"
        android:contentDescription="@string/ai_conversation"
        />

    <Button
        android:id="@+id/btnCameraToggle"
        android:text="📷"
        android:textSize="18sp"
        android:textColor="@color/white"
        android:background="@drawable/shape_circle_camera_off"
        android:elevation="8dp"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/btnAIConversation"
        app:layout_constraintStart_toEndOf="@+id/btnAIConversation"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="24dp"
        android:contentDescription="@string/camera_off"
        />

    <TextureView
        android:id="@+id/cameraPreview"
        android:layout_width="120dp"
        android:layout_height="160dp"
        android:visibility="gone"
        android:scaleX="-1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginStart="16dp"
        android:layout_marginTop="48dp"
        />

    <Button
        android:id="@+id/btnRecord"
        android:text="@string/record"
        android:enabled="false"
        android:visibility="gone"
        android:textSize="13sp"
        android:textColor="@color/white"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="48dp"
        android:background="@drawable/shape_common_btn"
        android:layout_margin="6dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <Button
        android:id="@+id/btnPlayPCM"
        android:text="@string/play_pcm"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/btnAIConversation"
        android:background="@drawable/shape_common_btn"
        android:layout_margin="6dp"
        android:textSize="13sp"
        android:textColor="@color/white"
        android:enabled="false"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

    <Button
        android:id="@+id/btnPlayWAV"
        android:text="@string/play_wav"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/btnPlayPCM"
        android:background="@drawable/shape_common_btn"
        android:layout_margin="6dp"
        android:textSize="13sp"
        android:textColor="@color/white"
        android:enabled="false"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

</androidx.constraintlayout.widget.ConstraintLayout>