<?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="match_parent">

    <ScrollView
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="72dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

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

            <TextView
                android:id="@+id/tipsTv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:includeFontPadding="false"
                android:textColor="@color/text_tertiary"
                android:textSize="12sp"
                android:text="偏好设置仅用于游戏的个性化推荐"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/frequencyContainer"
                style="@style/interestedGameContainer"
                android:layout_marginTop="16dp"
                android:background="@drawable/bg_shape_white_radius_8"
                app:layout_constraintTop_toBottomOf="@+id/tipsTv"
                tools:ignore="MissingConstraints">

                <TextView
                    android:id="@+id/frequencyTitle"
                    style="@style/interestedGameTitle"
                    android:textColor="@color/text_primary"
                    android:text="您的游戏频率是：" />

                <CheckedTextView
                    android:id="@+id/frequencyOne"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:text="每天玩"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/frequencyTwo"
                    app:layout_constraintTop_toBottomOf="@+id/frequencyTitle" />

                <CheckedTextView
                    android:id="@+id/frequencyTwo"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:text="节假日玩"
                    android:layout_marginStart="8dp"
                    app:layout_constraintStart_toEndOf="@+id/frequencyOne"
                    app:layout_constraintEnd_toStartOf="@+id/frequencyThree"
                    app:layout_constraintTop_toBottomOf="@+id/frequencyTitle" />

                <CheckedTextView
                    android:id="@+id/frequencyThree"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:text="偶尔玩"
                    android:layout_marginStart="8dp"
                    app:layout_constraintStart_toEndOf="@+id/frequencyTwo"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/frequencyTitle" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/conditionContainer"
                style="@style/interestedGameContainer"
                android:background="@drawable/bg_shape_white_radius_8"
                app:layout_constraintTop_toBottomOf="@+id/frequencyContainer"
                tools:ignore="MissingConstraints">

                <TextView
                    android:id="@+id/conditionTitle"
                    style="@style/interestedGameTitle"
                    android:textColor="@color/text_primary"
                    android:text="您选择游戏的条件是：" />

                <CheckedTextView
                    android:id="@+id/conditionOne"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:text="尝试新游戏"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/conditionTwo"
                    app:layout_constraintTop_toBottomOf="@+id/conditionTitle" />

                <CheckedTextView
                    android:id="@+id/conditionTwo"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:text="经典的老游戏"
                    android:layout_marginStart="8dp"
                    app:layout_constraintStart_toEndOf="@+id/conditionOne"
                    app:layout_constraintEnd_toStartOf="@+id/conditionThree"
                    app:layout_constraintTop_toBottomOf="@+id/conditionTitle" />

                <View
                    android:visibility="invisible"
                    android:id="@+id/conditionThree"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:layout_marginStart="8dp"
                    app:layout_constraintStart_toEndOf="@+id/conditionTwo"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/conditionTitle" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/tendencyContainer"
                style="@style/interestedGameContainer"
                android:background="@drawable/bg_shape_white_radius_8"
                app:layout_constraintTop_toBottomOf="@+id/conditionContainer"
                tools:ignore="MissingConstraints">

                <TextView
                    android:id="@+id/tendencyTitle"
                    style="@style/interestedGameTitle"
                    android:textColor="@color/text_primary"
                    android:text="您更倾向：" />

                <CheckedTextView
                    android:id="@+id/tendencyOne"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:gravity="center"
                    android:text="单人游玩"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toStartOf="@+id/tendencyTwo"
                    app:layout_constraintTop_toBottomOf="@+id/tendencyTitle" />

                <CheckedTextView
                    android:id="@+id/tendencyTwo"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:text="和朋友一块玩"
                    android:layout_marginStart="8dp"
                    app:layout_constraintStart_toEndOf="@+id/tendencyOne"
                    app:layout_constraintEnd_toStartOf="@+id/tendencyThree"
                    app:layout_constraintTop_toBottomOf="@+id/tendencyTitle" />

                <CheckedTextView
                    android:id="@+id/tendencyThree"
                    style="@style/interestedGameTag"
                    android:background="@drawable/interested_game_tag_selector"
                    android:textColor="@color/interested_game_tag_text_selector"
                    android:layout_marginStart="8dp"
                    android:text="认识更多玩家"
                    app:layout_constraintStart_toEndOf="@+id/tendencyTwo"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/tendencyTitle" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/typeContainer"
                style="@style/interestedGameContainer"
                android:background="@drawable/bg_shape_white_radius_8"
                app:layout_constraintTop_toBottomOf="@+id/tendencyContainer"
                tools:ignore="MissingConstraints">

                <TextView
                    android:id="@+id/typeTitle"
                    style="@style/interestedGameTitle"
                    android:textColor="@color/text_primary"
                    android:text="您更感兴趣的分类是：" />

                <com.google.android.flexbox.FlexboxLayout
                    android:id="@+id/typeFlexBox"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:layout_weight="1"
                    app:flexDirection="row"
                    app:flexWrap="wrap"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/typeTitle" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

    <View
        android:layout_width="0dp"
        android:layout_height="72dp"
        android:background="@color/ui_surface"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

    <TextView
        android:id="@+id/saveBtn"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_margin="16dp"
        style="@style/PrimaryGradientButton"
        android:alpha="0.4"
        android:gravity="center"
        android:textSize="14sp"
        android:text="保存"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>