<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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="match_parent"
    android:background="@color/backgroundColor"
    tools:context=".MyPostsActivity">

    <RelativeLayout
        android:background="@color/app_color"
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="50dp">

        <ImageButton
            android:id="@+id/back_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:onClick="finish"
            android:padding="15dp"
            android:src="@drawable/ic_arrow_back"
            app:tint="@color/white" />

        <TextView
            android:id="@+id/title_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_toRightOf="@id/back_btn"
            android:text="@string/my_post"
            android:textColor="@color/white"
            android:textSize="16dp" />

    </RelativeLayout>
    <RelativeLayout
        android:layout_below="@id/toolbar"
        android:layout_marginTop="5dp"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
            app:spanCount="2"
            tools:listitem="@layout/item_poster_vertical"/>

        <com.facebook.shimmer.ShimmerFrameLayout
            android:id="@+id/shimmer_lay"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/_200sdp"
                    android:orientation="horizontal">
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>

                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/_200sdp"
                    android:orientation="horizontal">
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>

                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/_200sdp"
                    android:orientation="horizontal">
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>

                </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/_200sdp"
                    android:orientation="horizontal">
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>
                    <androidx.cardview.widget.CardView
                        android:layout_margin="5dp"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_weight="1"
                        app:cardBackgroundColor="@color/shimmer_bg"
                        app:cardCornerRadius="@dimen/_8sdp"/>

                </LinearLayout>

            </LinearLayout>

        </com.facebook.shimmer.ShimmerFrameLayout>

    </RelativeLayout>
    <LinearLayout
        android:visibility="gone"
        android:id="@+id/no_data_layout"
        android:gravity="center"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:orientation="vertical">
        <com.airbnb.lottie.LottieAnimationView
            android:layout_width="@dimen/_150sdp"
            android:layout_height="@dimen/_150sdp"
            app:lottie_rawRes="@raw/no_data"
            app:lottie_autoPlay="true"
            app:lottie_loop="true"/>
        <TextView
            android:layout_marginTop="@dimen/_5sdp"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/no_item_found"
            android:textSize="20dp"
            android:textColor="@color/textColor"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/there_is_no_data_so"
            android:textSize="15dp"
            android:textColor="@color/hintColor"/>
    </LinearLayout>
</RelativeLayout>