<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <variable
            name="voiceGeneratingViewModel"
            type="com.atmob.voiceai.module.generating.VoiceGeneratingViewModel" />

        <import type="com.atmob.common.ui.SizeUtil" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorPrimary">


        <ImageView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:src="@drawable/bg_generating_background1"
            app:layout_constraintDimensionRatio="1080:1722"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:src="@drawable/bg_generating_background2"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="1080:1515"
            app:layout_constraintEnd_toEndOf="parent" />

        <Space
            android:id="@+id/space_status_bar"
            android:layout_width="match_parent"
            android:layout_height="@{SizeUtil.getStatusBarHeight(), default=@dimen/app_status_bar_height}"
            app:layout_constraintTop_toTopOf="parent" />

        <Space
            android:id="@+id/space1"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="360:74"
            app:layout_constraintTop_toBottomOf="@+id/space_status_bar" />

        <ImageView
            android:id="@+id/iv_avatar"
            imageUrl="@{voiceGeneratingViewModel.cloneBean.avatarUrl}"
            radius="@{100}"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginStart="23dp"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/space1"
            app:layout_constraintWidth_percent="0.2"
            tools:src="@drawable/bg_voice_ai_tab_selected" />

        <TextView
            android:id="@+id/tv_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:textColor="@color/white"
            android:textSize="20sp"
            app:layout_constraintLeft_toLeftOf="@+id/iv_avatar"
            app:layout_constraintTop_toBottomOf="@+id/iv_avatar"
            tools:text="Taylor Swift" />

        <Space
            android:id="@+id/space2"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintDimensionRatio="360:32"
            app:layout_constraintTop_toBottomOf="@id/tv_name" />

        <TextView
            android:id="@+id/tv_generating_hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/voice_generating_hint"
            android:textColor="@color/white"
            android:textSize="30sp"
            android:textStyle="bold"
            app:layout_constraintLeft_toLeftOf="@id/iv_avatar"
            app:layout_constraintTop_toBottomOf="@+id/space2" />

        <TextView
            android:id="@+id/tv_generating_hint2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/voice_generating_hint2"
            android:textColor="@color/white80"
            android:textSize="14sp"
            app:layout_constraintLeft_toLeftOf="@id/iv_avatar"
            app:layout_constraintTop_toBottomOf="@+id/tv_generating_hint" />


        <com.tencent.qgame.animplayer.AnimView
            app:layout_constraintVertical_bias="0.184390243902439"
            app:layout_constraintTop_toBottomOf="@+id/tv_generating_hint2"
            app:layout_constraintBottom_toBottomOf="parent"
            android:id="@+id/anim_view"
            app:layout_constraintDimensionRatio="360:200.5"
            android:layout_width="match_parent"
            android:layout_height="0dp" />

        <TextView
            android:text="@{voiceGeneratingViewModel.generatingTime}"
            app:layout_constraintVertical_bias="0.5274825174825175"
            android:textSize="14sp"
            android:textColor="@color/white"
            app:layout_constraintTop_toBottomOf="@+id/anim_view"
            app:layout_constraintBottom_toBottomOf="parent"
            android:gravity="center"
            tools:text="Generating ~ 15 sec"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>