<?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:id="@+id/communityHomeContainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/ui_background">

    <ImageView
        android:id="@+id/topBg"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:scaleType="centerCrop"
        android:src="@drawable/bg_forum_home_top"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/navigationBg"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="@+id/tabContainer"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <com.gh.gamecenter.common.view.StatusBarView
        android:id="@+id/statusBar"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/tabContainer"
        android:layout_width="match_parent"
        android:layout_height="52dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/statusBar">

        <ImageView
            android:id="@+id/iv_back"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_centerVertical="true"
            android:paddingStart="16dp"
            android:paddingEnd="16dp"
            android:src="@drawable/ic_bar_back"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.tabs.TabLayout
            android:id="@+id/tabLayout"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginEnd="96dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/iv_back"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_goneMarginStart="4dp"
            app:tabGravity="fill"
            app:tabIndicator="@null"
            app:tabMaxWidth="0dp"
            app:tabMinWidth="0dp"
            app:tabMode="scrollable"
            app:tabPaddingEnd="12dp"
            app:tabPaddingStart="12dp"
            app:tabTextAppearance="@style/TabLayoutTextAppearance" />

        <com.gh.gamecenter.common.view.TabIndicatorView
            android:id="@+id/indicatorView"
            android:layout_width="0dp"
            android:layout_height="8dp"
            app:disableIndicatorScaling="true"
            app:indicatorDrawable="@drawable/ic_commodity_selected"
            app:layout_constraintBottom_toBottomOf="@id/tabLayout"
            app:layout_constraintEnd_toEndOf="@id/tabLayout"
            app:layout_constraintStart_toStartOf="@id/tabLayout" />


    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:id="@+id/videoAndSearchContainer"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_marginRight="8dp"
        android:gravity="center"
        android:orientation="horizontal"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="@+id/tabContainer"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@+id/tabContainer"
        tools:visibility="visible">

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/videoLottie"
            android:layout_width="40dp"
            android:layout_height="56dp"
            app:lottie_autoPlay="false"
            app:lottie_fileName="lottie/video.json"
            app:lottie_loop="true"
            app:lottie_progress="100"
            app:lottie_colorFilter="@color/text_primary"
            app:lottie_repeatCount="2"
            app:lottie_repeatMode="restart" />

        <ImageView
            android:id="@+id/searchIconIv"
            android:layout_width="40dp"
            android:layout_height="match_parent"
            android:paddingStart="8dp"
            android:paddingEnd="8dp"
            app:srcCompat="@drawable/ic_column_search"
            app:tint="@color/text_primary" />

    </LinearLayout>


    <androidx.viewpager.widget.ViewPager
        android:id="@+id/viewPager"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tabContainer" />

    <ImageView
        android:id="@+id/communityEditBtn"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="8dp"
        android:layout_marginBottom="16dp"
        android:src="@drawable/community_edit_icon"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintRight_toRightOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>