<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:gravity="center_horizontal"
    android:orientation="vertical">

    <TextView
        android:id="@+id/notEnoughCommentTips"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="28dp"
        android:layout_marginBottom="22dp"
        android:drawableLeft="@drawable/ic_game_detail_no_rating_tips"
        android:drawablePadding="4dp"
        android:gravity="center"
        android:includeFontPadding="false"
        android:text="还没有收集到足够的评价，无法给出公正的评分"
        android:textColor="@color/text_tertiary"
        android:textSize="14sp"
        android:visibility="gone" />

    <LinearLayout
        android:id="@+id/scoreProgressContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="28dp"
        android:layout_marginBottom="22dp"
        android:orientation="horizontal">

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

            <RelativeLayout
                android:layout_width="64dp"
                android:layout_height="64dp">

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:src="@drawable/bg_game_detail_rating_score" />

                <TextView
                    android:id="@+id/scoreTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:textColor="@color/white"
                    tools:text="8.5" />
            </RelativeLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="40dp"
            android:layout_weight="1"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
                    style="@style/Widget.MaterialRatingBar.RatingBar"
                    android:layout_width="60dp"
                    android:layout_height="8dp"
                    android:isIndicator="true"
                    android:minWidth="8dp"
                    android:minHeight="8dp"
                    android:rating="5"
                    app:mrb_progressTint="@color/primary_theme" />

                <ProgressBar
                    android:id="@+id/rating_score_five"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="4dp"
                    android:layout_marginLeft="8dp"
                    android:max="100"
                    android:progress="50"
                    android:progressDrawable="@drawable/progressbar_bg_style" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
                    style="@style/Widget.MaterialRatingBar.RatingBar"
                    android:layout_width="60dp"
                    android:layout_height="8dp"
                    android:isIndicator="true"
                    android:minWidth="8dp"
                    android:minHeight="8dp"
                    android:rating="4"
                    app:mrb_progressTint="@color/primary_theme" />

                <ProgressBar
                    android:id="@+id/rating_score_four"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="4dp"
                    android:layout_marginLeft="8dp"
                    android:max="100"
                    android:progress="50"
                    android:progressDrawable="@drawable/progressbar_bg_style" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
                    style="@style/Widget.MaterialRatingBar.RatingBar"
                    android:layout_width="60dp"
                    android:layout_height="8dp"
                    android:isIndicator="true"
                    android:minWidth="8dp"
                    android:minHeight="8dp"
                    android:rating="3"
                    app:mrb_progressTint="@color/primary_theme" />

                <ProgressBar
                    android:id="@+id/rating_score_three"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="4dp"
                    android:layout_marginLeft="8dp"
                    android:max="100"
                    android:progress="50"
                    android:progressDrawable="@drawable/progressbar_bg_style" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
                    style="@style/Widget.MaterialRatingBar.RatingBar"
                    android:layout_width="60dp"
                    android:layout_height="8dp"
                    android:isIndicator="true"
                    android:minWidth="8dp"
                    android:minHeight="8dp"
                    android:rating="2"
                    app:mrb_progressTint="@color/primary_theme" />

                <ProgressBar
                    android:id="@+id/rating_score_two"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="4dp"
                    android:layout_marginLeft="8dp"
                    android:max="100"
                    android:progress="50"
                    android:progressDrawable="@drawable/progressbar_bg_style" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <com.gh.gamecenter.common.view.materialratingbar.MaterialRatingBar
                    style="@style/Widget.MaterialRatingBar.RatingBar"
                    android:layout_width="60dp"
                    android:layout_height="8dp"
                    android:isIndicator="true"
                    android:minWidth="8dp"
                    android:minHeight="8dp"
                    android:rating="1"
                    app:mrb_progressTint="@color/primary_theme" />

                <ProgressBar
                    android:id="@+id/rating_score_one"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:layout_width="match_parent"
                    android:layout_height="4dp"
                    android:layout_marginLeft="8dp"
                    android:max="100"
                    android:progress="50"
                    android:progressDrawable="@drawable/progressbar_bg_style" />

            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <LinearLayout
        android:id="@+id/actionButtonContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:orientation="vertical">

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

            <LinearLayout
                android:id="@+id/rating_amway_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@drawable/game_detail_amway_bg"
                android:gravity="center">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="40dp"
                    android:drawableLeft="@drawable/ic_game_detail_amway"
                    android:drawablePadding="4dp"
                    android:gravity="center"
                    android:text="我要安利"
                    android:textColor="@color/text_theme"
                    android:textSize="14sp" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/rating_edit_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dp"
                android:layout_weight="1"
                android:background="@drawable/game_detail_btn_receive"
                android:gravity="center">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="40dp"
                    android:drawableLeft="@drawable/ic_game_detail_ratting"
                    android:drawablePadding="4dp"
                    android:gravity="center"
                    android:text="我来评价"
                    android:textColor="@color/white"
                    android:textSize="14sp" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/stopServerContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="32dp"
        android:background="@drawable/bg_rating_stop_server_remind"
        android:visibility="gone"
        tools:visibility="visible">

        <ImageView
            android:id="@+id/stopServerTopIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="16dp"
            android:src="@drawable/ic_rating_remind"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <View
            android:layout_width="1dp"
            android:layout_height="0dp"
            android:layout_marginLeft="16dp"
            android:background="#331383EB"
            app:layout_constraintBottom_toBottomOf="@+id/stopServerTv"
            app:layout_constraintStart_toEndOf="@+id/stopServerTopIcon"
            app:layout_constraintTop_toTopOf="@+id/stopServerTitleTv" />

        <TextView
            android:id="@+id/stopServerTitleTv"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="32dp"
            android:layout_marginTop="14dp"
            android:layout_marginRight="16dp"
            android:includeFontPadding="false"
            android:text="停服保护状态下，评价将不计入总分"
            android:textColor="@color/text_theme"
            android:textSize="13sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/stopServerTopIcon"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/stopServerTv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="32dp"
            android:layout_marginTop="4dp"
            android:layout_marginBottom="14dp"
            android:includeFontPadding="false"
            android:text="什么是停服保护"
            android:textColor="@color/text_theme"
            android:textSize="11sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@+id/stopServerTopIcon"
            app:layout_constraintTop_toBottomOf="@+id/stopServerTitleTv" />

        <ImageView
            android:id="@+id/stopServerIv"
            android:layout_width="10dp"
            android:layout_height="10dp"
            android:layout_marginLeft="3dp"
            android:src="@drawable/ic_game_detail_kaifu_tips"
            app:layout_constraintBottom_toBottomOf="@+id/stopServerTv"
            app:layout_constraintStart_toEndOf="@+id/stopServerTv"
            app:layout_constraintTop_toTopOf="@+id/stopServerTv" />
    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:id="@+id/serviceCommentContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:background="@drawable/background_shape_white_radius_8"
        android:orientation="vertical">

        <TextView
            android:id="@+id/service_comment_title"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:gravity="center_vertical"
            android:includeFontPadding="false"
            android:paddingStart="16dp"
            android:text="小编评价"
            android:textColor="@color/text_primary"
            android:textSize="16sp"
            android:textStyle="bold" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:background="@color/ui_divider" />

        <include
            android:id="@+id/include_service_comment"
            layout="@layout/rating_comment_item" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/myCommentContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:background="@drawable/background_shape_white_radius_8"
        android:orientation="vertical">

        <TextView
            android:id="@+id/my_comment_title"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:gravity="center_vertical"
            android:includeFontPadding="false"
            android:paddingStart="16dp"
            android:text="我的评价"
            android:textColor="@color/text_primary"
            android:textSize="16sp"
            android:textStyle="bold" />

        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:background="@color/ui_divider" />

        <include
            android:id="@+id/include_my_comment"
            layout="@layout/rating_comment_item" />

    </LinearLayout>

    <RelativeLayout
        android:id="@+id/all_comment"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:layout_marginTop="16dp">

        <TextView
            android:id="@+id/all_comment_bar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:gravity="center_vertical"
            android:text="全部评价"
            android:textColor="@color/text_primary"
            android:textSize="18sp"
            android:textStyle="bold" />


        <TextView
            android:id="@+id/filter"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:background="@null"
            android:drawableEnd="@drawable/game_comment_filter_bottom"
            android:drawablePadding="4dp"
            android:gravity="center"
            android:text="筛选"
            android:textColor="@color/text_tertiary"
            android:textSize="12sp" />

        <TextView
            android:id="@+id/sort"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_marginEnd="16dp"
            android:layout_toStartOf="@id/filter"
            android:background="@null"
            android:drawableEnd="@drawable/game_comment_filter_bottom"
            android:drawablePadding="4dp"
            android:gravity="center"
            android:text="默认"
            android:textColor="@color/text_tertiary"
            android:textSize="12sp" />
    </RelativeLayout>
</LinearLayout>

