<?xml version="1.0" encoding="utf-8"?><!--
  ~ Aurora Store
  ~ Copyright (C) 2019, Rahul Kumar Patel <whyorean@gmail.com>
  ~
  ~ Aurora Store is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 2 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Aurora Store is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Aurora Store.  If not, see <http://www.gnu.org/licenses/>.
  ~
  ~
  -->

<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:id="@+id/reviews_container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="@dimen/margin_medium"
    android:orientation="vertical"
    android:visibility="gone"
    tools:visibility="visible">

    <com.google.android.material.chip.Chip
        style="@style/Widget.MaterialComponents.Chip.Action"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:layout_margin="@dimen/margin_xsmall"
        android:clickable="false"
        android:text="@string/details_rating_reviews"
        app:chipBackgroundColor="?android:attr/colorBackground"
        app:chipStrokeColor="?android:attr/colorControlNormal"
        app:chipStrokeWidth=".75dp"
        app:iconStartPadding="@dimen/margin_xxsmall" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:baselineAligned="false"
        android:paddingStart="@dimen/margin_normal"
        android:paddingEnd="@dimen/margin_normal"
        android:weightSum="4">

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:orientation="vertical"
            android:padding="@dimen/margin_small">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/average_rating"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_margin="@dimen/margin_xxsmall"
                android:textAppearance="@style/TextAppearance.Aurora.Title"
                android:textSize="28sp"
                android:textStyle="normal"
                tools:text="4.5" />

            <RatingBar
                android:id="@+id/average_rating_star"
                style="?ratingBarStyleSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:clickable="false"
                android:numStars="5"
                android:stepSize=".5" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/count_stars"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:textAppearance="@style/TextAppearance.Aurora.Body" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/avg_rating_layout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="3"
            android:orientation="vertical" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/user_review_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="gone"
        tools:visibility="visible">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/margin_normal"
            android:gravity="center"
            android:orientation="vertical">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/rate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/details_rate_this_app"
                android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/margin_xxsmall"
                android:text="@string/details_why_rate_this_app"
                android:textAppearance="@style/TextAppearance.Aurora.Line3" />

            <RatingBar
                android:id="@+id/user_stars"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:numStars="5"
                android:scaleX=".75"
                android:scaleY=".75"
                android:stepSize="1"
                android:theme="@style/RatingBarReviews" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/user_comment_layout"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="vertical"
            android:visibility="gone">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/user_title"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textAppearance="@style/TextAppearance.Aurora.Line2" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/user_comment"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:textAppearance="@style/TextAppearance.Aurora.Line2" />
        </LinearLayout>

        <com.google.android.material.chip.Chip
            android:id="@+id/review_delete"
            style="@style/Widget.MaterialComponents.Chip.Action"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/delete"
            android:visibility="gone"
            app:chipBackgroundColor="?android:attr/colorBackground"
            app:chipStrokeColor="@color/colorGreyLight"
            app:chipStrokeWidth="1dp" />
    </LinearLayout>

    <RelativeLayout
        android:id="@+id/more_reviews_layout"
        android:layout_width="match_parent"
        android:layout_height="?actionBarSize"
        android:layout_marginTop="@dimen/margin_medium"
        android:background="?selectableItemBackground"
        android:paddingStart="@dimen/margin_medium"
        android:paddingEnd="@dimen/margin_medium">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_toStartOf="@id/img_more"
            android:text="@string/details_appReviewsAll"
            android:textAppearance="@style/TextAppearance.Aurora.SubTitle" />

        <androidx.appcompat.widget.AppCompatImageButton
            android:id="@+id/img_more"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:background="@null"
            android:clickable="false"
            android:focusable="false"
            android:paddingTop="@dimen/margin_small"
            android:paddingBottom="@dimen/margin_small"
            android:src="@drawable/ic_arrow" />
    </RelativeLayout>
</LinearLayout>