<?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="progress"
            type="Integer" />

        <variable
            name="recoverClick"
            type="android.view.View.OnClickListener" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <View
            android:onClick="@{recoverClick}"
            android:id="@+id/v_trial"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:background="@drawable/bg_trial_recover"
            app:layout_constraintDimensionRatio="360:72"
            app:layout_constraintTop_toTopOf="parent" />

        <ImageView
            android:id="@+id/iv_trial_title"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
            android:src="@drawable/icon_trial_title"
            app:layout_constraintBottom_toBottomOf="@+id/v_trial"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="@id/v_trial"
            app:layout_constraintTop_toTopOf="@+id/v_trial"
            app:layout_constraintVertical_bias="0.3076923076923077"
            app:layout_constraintWidth_percent="0.0555555555555556" />

        <TextView
            android:id="@+id/tv_trial_progress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="3dp"
            android:textColor="#6A3420"
            android:textSize="18sp"
            android:textStyle="bold"
            android:text="@{@string/trial_progress(progress)}"
            app:layout_constraintBottom_toBottomOf="@+id/v_trial"
            app:layout_constraintStart_toEndOf="@+id/iv_trial_title"
            app:layout_constraintTop_toTopOf="@+id/v_trial"
            app:layout_constraintVertical_bias="0.25"
            tools:text="已扫描6%" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/trial_recover"
            android:textColor="#B46B36"
            android:textSize="13sp"
            app:layout_constraintBottom_toBottomOf="@id/v_trial"
            app:layout_constraintStart_toStartOf="@id/iv_trial_title"
            app:layout_constraintTop_toTopOf="@id/v_trial"
            app:layout_constraintVertical_bias="0.75" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginEnd="@dimen/app_common_page_horizontal_padding"
            android:background="@drawable/bg_trial_go_recover"
            android:gravity="center"
            android:text="@string/trial_go_recover"
            android:textColor="#6A3420"
            android:textSize="14sp"
            app:layout_constraintBottom_toBottomOf="@id/v_trial"
            app:layout_constraintDimensionRatio="84:32"
            app:layout_constraintEnd_toEndOf="@+id/v_trial"
            app:layout_constraintTop_toTopOf="@id/v_trial"
            app:layout_constraintWidth_percent="0.2333333333333333" />

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