<?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/background_white"
    app:cardCornerRadius="8dp"
    app:cardElevation="0dp">

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

        <ImageView
            android:id="@+id/head_background"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:scaleType="fitXY"
            android:src="@drawable/dialog_privacy_head"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <View
            android:layout_width="0dp"
            android:layout_height="4dp"
            android:layout_marginBottom="2dp"
            android:background="@drawable/dialog_privacy_title_underline"
            app:layout_constraintBottom_toBottomOf="@id/title"
            app:layout_constraintLeft_toLeftOf="@id/title"
            app:layout_constraintRight_toRightOf="@id/title" />

        <TextView
            android:id="@+id/title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="40dp"
            android:layout_marginRight="16dp"
            android:textColor="@color/text_title"
            android:textSize="24sp"
            android:textStyle="bold"
            app:layout_constraintLeft_toLeftOf="@id/head_background"
            app:layout_constraintTop_toTopOf="@id/head_background"
            tools:text="欢迎来到光环助手" />

        <TextView
            android:id="@+id/top_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginTop="28dp"
            android:layout_marginRight="16dp"
            android:includeFontPadding="false"
            android:lineSpacingExtra="8dp"
            android:textColor="@color/text_title"
            android:textSize="13sp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@id/title"
            app:layout_goneMarginTop="16dp"
            tools:text="为提供完整的" />

        <FrameLayout
            android:id="@+id/permission_container"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@id/top_content">

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

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/permissions_content"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginLeft="16dp"
                    android:layout_marginTop="12dp"
                    android:layout_marginRight="16dp"
                    android:layout_marginBottom="16dp"
                    android:layout_weight="1" />

                <TextView
                    android:id="@+id/bottom_content"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="16dp"
                    android:layout_marginRight="16dp"
                    android:layout_marginBottom="20dp"
                    android:includeFontPadding="false"
                    android:lineSpacingExtra="8dp"
                    android:textColor="@color/text_title"
                    android:textSize="13sp"
                    tools:text="这是啥" />

            </LinearLayout>
        </FrameLayout>

        <TextView
            android:id="@+id/link_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:layout_marginRight="16dp"
            android:layout_marginBottom="20dp"
            android:includeFontPadding="false"
            android:lineSpacingExtra="8dp"
            android:textColor="@color/text_title"
            android:textSize="11sp"
            android:visibility="gone"
            app:layout_constraintBottom_toTopOf="@id/allow_button"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@id/permission_container"
            tools:text="你可以在"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/allow_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginRight="12dp"
            android:layout_marginBottom="6dp"
            android:background="@drawable/dialog_privacy_button"
            android:gravity="center"
            android:paddingBottom="16dp"
            android:text="授权，开启光环"
            android:textColor="@color/white"
            android:textSize="14sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toTopOf="@id/disallow_button"
            app:layout_constraintTop_toBottomOf="@id/link_content" />

        <TextView
            android:id="@+id/disallow_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="16dp"
            android:includeFontPadding="false"
            android:padding="4dp"
            android:text="暂不授权"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="14sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>