<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/cl"
    android:background="@color/background_white"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <RelativeLayout
        android:id="@+id/contentContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background_white">

        <ImageView
            android:id="@+id/background"
            android:layout_width="match_parent"
            android:layout_height="400dp"
            android:scaleType="fitXY"
            android:src="@drawable/bg_energy_center_top" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="336dp"
            android:gravity="center_horizontal">

            <ImageView
                android:layout_width="64dp"
                android:layout_height="64dp"
                android:src="@drawable/ic_energy_center_sign" />

            <ImageView
                android:layout_width="64dp"
                android:layout_height="64dp"
                android:layout_marginLeft="48dp"
                android:src="@drawable/ic_energy_center_invite" />
        </LinearLayout>
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/bottomSheet"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/transparent"
        android:orientation="vertical"
        app:behavior_hideable="false"
        app:behavior_peekHeight="300dp"
        app:layout_behavior="@string/bottom_sheet_behavior">

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

            <View
                android:id="@+id/collapsedBg"
                android:layout_width="match_parent"
                android:layout_height="320dp"
                android:background="@drawable/bg_bottom_sheet_collapses" />

            <View
                android:visibility="gone"
                android:id="@+id/expandedBg"
                android:layout_width="match_parent"
                android:layout_height="280dp"
                android:background="@drawable/bg_bottom_sheet_expanded" />

            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#FF4DCCD3" />
        </LinearLayout>

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

            <LinearLayout
                android:id="@+id/topContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_horizontal">

                <ImageView
                    android:id="@+id/signIv"
                    android:layout_width="64dp"
                    android:layout_height="64dp"
                    android:src="@drawable/ic_energy_center_sign" />

                <ImageView
                    android:id="@+id/inviteIv"
                    android:layout_width="64dp"
                    android:layout_height="64dp"
                    android:layout_marginLeft="48dp"
                    android:src="@drawable/ic_energy_center_invite" />
            </LinearLayout>

            <RelativeLayout
                android:id="@+id/tabContainer"
                android:layout_width="match_parent"
                android:layout_height="51dp"
                android:layout_marginTop="8dp">

                <com.gh.gamecenter.common.view.TabIndicatorView
                    android:id="@+id/indicatorView"
                    android:layout_width="match_parent"
                    android:layout_height="8dp"
                    android:layout_alignParentBottom="true"
                    app:disableIndicatorScaling="true"
                    app:indicatorDrawable="@drawable/ic_energy_tab_indicator" />

                <com.google.android.material.tabs.TabLayout
                    android:id="@+id/tabLayout"
                    android:layout_width="match_parent"
                    android:layout_height="44dp"
                    app:tabMaxWidth="0dp"
                    app:tabMode="fixed"
                    app:tabIndicator="@null"
                    app:tabTextAppearance="@style/TabLayoutTextAppearance" />
            </RelativeLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:background="#CCFCFF" />

            <androidx.viewpager.widget.ViewPager
                android:id="@+id/viewpager"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>
    </RelativeLayout>

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

        <com.gh.gamecenter.common.view.StatusBarView
            android:id="@+id/statusBarView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_below="@+id/statusBarView"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            app:navigationIcon="@null">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <ImageView
                    android:id="@+id/backIv"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:padding="12dp"
                    android:layout_centerVertical="true"
                    android:src="@drawable/ic_toolbar_back_white" />

                <RelativeLayout
                    android:id="@+id/userEnergyContainer"
                    android:layout_width="73dp"
                    android:layout_height="22dp"
                    android:layout_marginTop="13dp"
                    android:layout_marginLeft="47dp"
                    android:clipChildren="false"
                    android:gravity="center_vertical">

                    <TextView
                        android:id="@+id/userEnergy"
                        android:layout_width="72dp"
                        android:layout_height="20dp"
                        android:layout_marginLeft="1dp"
                        android:gravity="center"
                        android:layout_centerVertical="true"
                        android:background="@drawable/bg_energy_value"
                        android:textColor="@color/white"
                        android:textSize="14sp"
                        android:text="0" />

                    <ImageView
                        android:layout_width="8dp"
                        android:layout_height="12dp"
                        android:layout_marginRight="9dp"
                        android:layout_centerVertical="true"
                        android:layout_alignParentRight="true"
                        android:src="@drawable/ic_energy_more" />

                    <ImageView
                        android:layout_width="22dp"
                        android:layout_height="22dp"
                        android:src="@drawable/ic_energy_center_top_energy" />
                </RelativeLayout>

                <ImageView
                    android:id="@+id/energyRuleTv"
                    android:layout_width="74dp"
                    android:layout_height="20dp"
                    android:layout_marginTop="13dp"
                    android:layout_marginRight="16dp"
                    android:layout_alignParentRight="true"
                    android:gravity="center_vertical"
                    android:src="@drawable/pic_energy_rule" />
            </RelativeLayout>
        </androidx.appcompat.widget.Toolbar>
    </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>