<?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="match_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/dialog_app_updating_bg">

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="32dp"
        android:layout_marginBottom="10dp"
        android:text="@string/dialog_updating"
        android:textColor="@color/text_primary"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />


    <ProgressBar
        android:id="@+id/progress"
        style="?android:attr/progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="6dp"
        android:layout_marginLeft="24dp"
        android:layout_marginTop="60dp"
        android:layout_marginRight="24dp"
        android:max="1000"
        android:progress="0"
        android:progressDrawable="@drawable/app_updating_progress_style"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title" />


    <View
        android:id="@+id/progress_filling"
        android:layout_width="5dp"
        android:layout_height="6dp"
        android:background="@drawable/app_updating_progress_filling"
        app:layout_constraintBottom_toBottomOf="@id/progress"
        app:layout_constraintLeft_toLeftOf="@id/progress"
        app:layout_constraintTop_toTopOf="@id/progress" />

    <TextView
        android:id="@+id/percent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:background="@drawable/app_updating_percent_bg"
        android:gravity="center_horizontal"
        android:paddingTop="2dp"
        android:textColor="@color/white"
        android:textSize="12sp"
        app:layout_constraintBottom_toTopOf="@id/progress_anchor"
        app:layout_constraintLeft_toLeftOf="@id/progress_anchor"
        app:layout_constraintRight_toRightOf="@id/progress_anchor"
        tools:text="18%" />

    <ImageView
        android:id="@+id/progress_anchor"
        android:layout_width="14dp"
        android:layout_height="14dp"
        android:background="@drawable/app_updating_progress_anchor"
        app:layout_constraintBottom_toBottomOf="@id/progress"
        app:layout_constraintLeft_toLeftOf="@id/progress"
        app:layout_constraintTop_toTopOf="@id/progress" />


    <TextView
        android:id="@+id/size"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginBottom="32dp"
        android:layout_weight="2"
        android:textColor="@color/text_tertiary"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="@id/progress"
        app:layout_constraintTop_toBottomOf="@id/progress"
        tools:text="18.19MB" />

    <TextView
        android:id="@+id/remain"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:textColor="@color/text_tertiary"
        android:textSize="12sp"
        app:layout_constraintRight_toRightOf="@id/progress"
        app:layout_constraintTop_toBottomOf="@id/progress"
        tools:text="剩余2s" />


    <ImageView
        android:id="@+id/app_tv_cancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginRight="16dp"
        android:src="@drawable/app_updating_cancel"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>