<?xml version="1.0" encoding="utf-8"?>
<com.flipboard.bottomsheet.BottomSheetLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.design.widget.AppBarLayout
            android:id="@+id/appbar_act_game_details"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fitsSystemWindows="true">
            <!--标题栏-->


            <android.support.design.widget.CollapsingToolbarLayout
                android:id="@+id/toolbar_layout_act_game_details"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fitsSystemWindows="true"
                app:contentScrim="?attr/colorPrimary"
                app:expandedTitleTextAppearance="@style/TextAppearance.Design.CollapsingToolbar.Expanded"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

                <!--大图-->
                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/white"
                    android:fitsSystemWindows="true"
                    android:gravity="center_horizontal"
                    app:layout_scrollFlags="scroll|enterAlways">

                    <ImageView
                        android:id="@+id/img_act_game_details_bg"
                        android:layout_width="match_parent"
                        android:layout_height="180dp"
                        android:background="@color/backColor"
                        android:scaleType="centerCrop" />

                    <ImageView
                        android:id="@+id/img_act_game_details_logo"
                        android:layout_width="@dimen/app_icon_wh_height_big"
                        android:layout_height="@dimen/app_icon_wh_height_big"
                        android:layout_below="@id/img_act_game_details_bg"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="-45dp" />

                    <TextView
                        android:id="@+id/txt_act_game_details_name"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/img_act_game_details_logo"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="4dp"
                        android:text="游戏名字"
                        android:textSize="@dimen/app_size_tv_mid" />


                    <TextView
                        android:id="@+id/txt_act_game_details_types"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/txt_act_game_details_name"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="4dp"
                        android:text="分类1|分类2"
                        android:textSize="@dimen/app_size_tv_small" />

                    <LinearLayout
                        android:id="@+id/dingwei1"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/txt_act_game_details_types"
                        android:layout_marginBottom="4dp"
                        android:layout_marginTop="4dp"
                        android:gravity="center"
                        android:orientation="horizontal">

                        <RatingBar
                            android:id="@+id/ratb_act_game_details"
                            style="?star_style"
                            android:layout_width="wrap_content"
                            android:isIndicator="true"
                            android:numStars="5"
                            android:rating="0" />

                        <TextView
                            android:id="@+id/txt_act_game_details_downcount"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="4dp" />
                    </LinearLayout>
                </RelativeLayout>

                <android.support.v7.widget.Toolbar
                    android:id="@+id/toolbar_act_game_details"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    app:contentInsetStart="0dp"
                    app:layout_collapseMode="pin"
                    app:layout_scrollFlags="scroll|exitUntilCollapsed"
                    app:title="Toolbar"
                    app:titleTextColor="@color/white">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="?attr/actionBarSize"
                        android:gravity="center_vertical"
                        android:orientation="horizontal"
                        android:paddingLeft="0dp">

                        <ImageView
                            android:id="@+id/img_back"
                            android:layout_width="48dp"
                            android:layout_height="match_parent"
                            android:scaleType="centerInside"
                            android:src="@drawable/back2" />

                        <TextView
                            android:id="@+id/txt_act_game_details_title"
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:ellipsize="end"
                            android:gravity="center"
                            android:text="游戏标题"
                            android:textColor="@color/B"
                            android:textSize="18sp" />

                        <ImageView
                            android:id="@+id/img_share"
                            android:layout_width="48dp"
                            android:layout_height="match_parent"
                            android:padding="@dimen/about_text_margin_10"
                            android:scaleType="centerInside"
                            android:src="@drawable/share2"
                            android:visibility="invisible"/>
                    </LinearLayout>
                </android.support.v7.widget.Toolbar>
            </android.support.design.widget.CollapsingToolbarLayout>
            <!--选项卡-->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:background="@color/white"
                android:orientation="horizontal">

                <android.support.design.widget.TabLayout
                    android:id="@+id/tabLayout"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:background="@color/white"
                    app:tabGravity="fill"
                    app:tabIndicatorColor="?attr/main_color"
                    app:tabIndicatorHeight="3dp"
                    app:tabMode="fixed"
                    app:tabSelectedTextColor="?attr/main_color"
                    app:tabTextAppearance="@style/TablLayoutTextStyle"
                    app:tabTextColor="@color/B" />
            </LinearLayout>

            <include layout="@layout/line_1px_hor" />
        </android.support.design.widget.AppBarLayout>

        <android.support.v4.widget.NestedScrollView
            android:id="@+id/nestedScrollView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginBottom="48dp"
            android:background="@color/white"
            android:fillViewport="false"
            app:layout_behavior="@string/appbar_scrolling_view_behavior">

            <com.kfzs.duanduan.view.ViewPagerAutoHeigh
                android:id="@+id/viewpager_act_game_details"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

        </android.support.v4.widget.NestedScrollView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:background="@color/white"
            android:orientation="vertical">

            <include layout="@layout/line_1px_hor" />

            <com.kfzs.duanduan.view.KFProgressButton
                android:id="@+id/downbtn_frg_fgt_app_detail_install"
                style="?small.button"
                android:layout_width="match_parent"
                android:layout_height="38dip"
                android:layout_marginBottom="5dp"
                android:layout_marginLeft="10dp"
                android:layout_marginRight="10dp"
                android:layout_marginTop="5dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:text="@string/install"
                android:textSize="@dimen/app_size_tv_small" />
        </LinearLayout>

    </android.support.design.widget.CoordinatorLayout>
</com.flipboard.bottomsheet.BottomSheetLayout>