<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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"
    app:cardBackgroundColor="@color/ui_surface"
    app:cardCornerRadius="8dp"
    app:cardElevation="0dp">

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

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="280dp"
            android:layout_marginBottom="16dp"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            app:layout_constraintBottom_toTopOf="@id/descTv"
            app:layout_constraintTop_toBottomOf="@id/titleContainer">

            <TextView
                android:id="@+id/contentTv"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fadeScrollbars="false"
                android:includeFontPadding="false"
                android:lineSpacingExtra="8dp"
                android:paddingRight="6dp"
                android:scrollbarStyle="outsideOverlay"
                android:scrollbarThumbVertical="@drawable/webview_scrollbar_thumb_vertical"
                android:scrollbars="vertical"
                android:text="@string/dialog_privacy_policy_content"
                android:textColor="@color/text_primary"
                android:textSize="14sp" />
        </FrameLayout>

        <LinearLayout
            android:id="@+id/titleContainer"
            android:layout_width="match_parent"
            android:layout_height="64dp"
            android:background="@color/ui_surface"
            android:gravity="center"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <ImageView
                android:id="@+id/titleIv"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:src="@mipmap/logo"
                android:visibility="gone"
                tools:visibility="visible" />

            <TextView
                android:id="@+id/privacyTitleTv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="4dp"
                android:text="光环助手隐私政策"
                android:textColor="@color/text_primary"
                android:textSize="16sp"
                android:textStyle="bold" />
        </LinearLayout>

        <TextView
            android:id="@+id/descTv"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:includeFontPadding="false"
            android:lineSpacingExtra="8dp"
            android:textColor="@color/text_primary"
            android:textSize="13sp"
            app:layout_constraintBottom_toTopOf="@id/line"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_goneMarginTop="16dp" />

        <TextView
            android:id="@+id/refuseTv"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:gravity="center"
            android:text="不同意"
            android:textColor="@color/text_secondary"
            android:textSize="14sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/divider_line"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/line" />

        <TextView
            android:id="@+id/agreeTv"
            android:layout_width="0dp"
            android:layout_height="50dp"
            android:gravity="center"
            android:text="同意"
            android:textColor="@color/text_theme"
            android:textSize="14sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/divider_line"
            app:layout_constraintTop_toBottomOf="@+id/line" />

        <View
            android:id="@+id/divider_line"
            android:layout_width="1dp"
            android:layout_height="50dp"
            android:background="@color/ui_divider"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/agreeTv"
            app:layout_constraintStart_toEndOf="@+id/refuseTv"
            app:layout_constraintTop_toBottomOf="@+id/line" />

        <View
            android:id="@+id/line"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="20dp"
            android:background="@color/ui_divider"
            app:layout_constraintTop_toBottomOf="@+id/descTv" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>