<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:clickable="true"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/head_background"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scaleType="fitXY"
            android:src="@drawable/app_update_head"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <View
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@drawable/app_update_background"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@id/head_background" />

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginTop="32dp"
            android:includeFontPadding="false"
            android:text="发现新版本"
            android:textColor="@color/white"
            android:textSize="22sp"
            android:textStyle="bold"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/size"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginTop="8dp"
            android:alpha="0.7"
            android:text="大小 18.19Mb"
            android:textColor="@color/white"
            android:textSize="12sp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@id/title" />

        <TextView
            android:id="@+id/externalTextTv"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginTop="1dp"
            android:layout_marginRight="24dp"
            android:gravity="left"
            android:includeFontPadding="false"
            android:lineSpacingExtra="4dp"
            android:textColor="@color/text_title"
            android:textSize="13sp"
            android:visibility="gone"
            app:layout_constraintLeft_toLeftOf="@id/head_background"
            app:layout_constraintRight_toRightOf="@id/head_background"
            app:layout_constraintTop_toBottomOf="@id/head_background"
            tools:text="部分设备若无法更新安装，请前往官网进行下载安装："
            tools:visibility="visible" />

        <TextView
            android:id="@+id/version"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginTop="24dp"
            android:layout_marginRight="24dp"
            android:textColor="@color/text_black"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintLeft_toLeftOf="@id/head_background"
            app:layout_constraintRight_toRightOf="@id/head_background"
            app:layout_constraintTop_toBottomOf="@id/externalTextTv"
            app:layout_goneMarginTop="1dp"
            tools:text="4.3.0更新" />

        <TextView
            android:id="@+id/desc"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginTop="8dp"
            android:layout_marginRight="24dp"
            android:lineSpacingExtra="4dp"
            android:textColor="@color/text_title"
            android:textSize="13sp"
            app:layout_constraintLeft_toLeftOf="@id/head_background"
            app:layout_constraintRight_toRightOf="@id/head_background"
            app:layout_constraintTop_toBottomOf="@id/version"
            tools:text="已在WiFi环境下完成下载" />

        <TextView
            android:id="@+id/downloadedHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            android:text="已在WiFi环境下完成下载"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="11sp"
            android:visibility="gone"
            app:layout_constraintLeft_toLeftOf="@id/desc"
            app:layout_constraintRight_toRightOf="@id/desc"
            app:layout_constraintTop_toBottomOf="@id/desc"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/confirm"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="24dp"
            android:layout_marginTop="10dp"
            android:layout_marginRight="24dp"
            style="@style/PrimaryGradientButton"
            android:gravity="center"
            android:includeFontPadding="false"
            android:paddingTop="12.5dp"
            android:paddingBottom="12.5dp"
            android:text="立即更新"
            android:textSize="16sp"
            app:layout_constraintLeft_toLeftOf="@id/head_background"
            app:layout_constraintRight_toRightOf="@id/head_background"
            app:layout_constraintTop_toBottomOf="@id/downloadedHint"
            app:layout_goneMarginTop="24dp" />

        <TextView
            android:id="@+id/cancel"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="9dp"
            android:layout_marginBottom="13dp"
            android:padding="6dp"
            android:text="暂不更新"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="14sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="@id/confirm"
            app:layout_constraintRight_toRightOf="@id/confirm"
            app:layout_constraintTop_toBottomOf="@id/confirm" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>