<?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="vm"
            type="com.rdiot.yx485.ui.bind.model.BindViewModel" />

        <import type="android.view.View" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="70dp"
            android:layout_weight="1"
            android:gravity="center_horizontal">


            <ImageView
                android:id="@+id/iv_ring"
                android:layout_width="200dp"
                android:layout_height="200dp"
                android:adjustViewBounds="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@mipmap/icon_ring" />


            <TextView
                android:id="@+id/tv_search"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/device_searching"
                android:textColor="@color/main_text_color"
                android:textSize="20sp"
                android:textStyle="bold"
                app:layout_constraintBottom_toBottomOf="@id/iv_ring"
                app:layout_constraintEnd_toEndOf="@id/iv_ring"
                app:layout_constraintStart_toStartOf="@id/iv_ring"
                app:layout_constraintTop_toTopOf="@id/iv_ring" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@{String.format(`%d`,vm.countDownTime)}"
                android:textColor="@color/main_sub_text_color"
                android:textSize="16sp"
                android:textStyle="bold"
                android:visibility="@{vm.countDownTime &lt;= 0 ?View.INVISIBLE:View.VISIBLE}"
                app:layout_constraintEnd_toEndOf="@id/iv_ring"
                app:layout_constraintStart_toStartOf="@id/iv_ring"
                app:layout_constraintTop_toBottomOf="@id/tv_search"
                tools:text="120" />

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintTop_toBottomOf="@id/iv_ring">

                <TextView
                    android:id="@+id/tv_debug"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="30dp"
                    android:gravity="center"
                    android:textColor="@color/main_text_color"
                    android:textSize="18sp" />
            </androidx.core.widget.NestedScrollView>

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_finish"
                android:layout_width="200dp"
                android:layout_height="200dp"
                android:adjustViewBounds="true"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

        </androidx.constraintlayout.widget.ConstraintLayout>


        <androidx.appcompat.widget.AppCompatButton
            android:id="@+id/btn_next"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="30dp"
            android:layout_marginEnd="30dp"
            android:layout_marginBottom="55dp"
            android:background="@drawable/bg_login_btn"
            android:outlineProvider="none"
            android:text="@string/finish"
            android:textColor="@color/white"
            android:textSize="16sp"
            android:textStyle="bold"
            android:visibility="gone" />

    </LinearLayout>
</layout>