<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/grey_background"
    android:orientation="vertical"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context=".DealarBoardActivity"
    tools:showIn="@layout/activity_mainmenu">

    <LinearLayout
        android:id="@+id/no_data_lay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/grey_background"
        android:orientation="vertical"
        android:visibility="visible"
        android:weightSum="8">

        <androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginLeft="5dp"
            android:layout_marginTop="5dp"
            android:layout_marginRight="5dp"
            android:layout_marginBottom="5dp"
            android:layout_weight="1"
            card_view:cardBackgroundColor="@color/white"
            card_view:cardCornerRadius="5dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center"
                android:text="Please download data"
                android:textSize="@dimen/text_size_16sp"
                android:textStyle="bold" />
        </androidx.cardview.widget.CardView>

        <View
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="0dp"
            android:layout_centerInParent="true"
            android:layout_gravity="center"
            android:layout_weight="4"
            android:background="@mipmap/sad_cloud" />

        <View
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1" />

        <androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginLeft="5dp"
            android:layout_marginTop="5dp"
            android:layout_marginRight="5dp"
            android:layout_marginBottom="5dp"
            android:layout_weight="1"
            card_view:cardBackgroundColor="@color/white"
            card_view:cardCornerRadius="5dp">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="All data not downloaded, Please sync data"
                android:textSize="@dimen/text_size_16sp"
                android:textStyle="bold" />
        </androidx.cardview.widget.CardView>
    </LinearLayout>

    <androidx.core.widget.NestedScrollView
        android:id="@+id/dealerb_scroll_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:weightSum="100">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="@dimen/custom_margin"
                android:text="@string/monthly_offers"
                android:textColor="@color/black"
                android:textSize="@dimen/txt_size_14sp"
                android:textStyle="bold"
                android:visibility="gone" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="150dp"
                android:background="@color/white">

                <fragment
                    android:id="@+id/monthly_offer_fragment"
                    android:name="com.cpm.lorealbaMabeline.fragements.MonthlyOfferFragment"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="@dimen/custom_margin3dp" />
            </RelativeLayout>

            <TextView
                android:id="@+id/txt_more"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center|right"
                android:layout_margin="@dimen/margin1dp"
                android:gravity="center|right"
                android:text="@string/more"
                android:textColor="@color/blue"
                android:textSize="@dimen/txt_size_14sp"
                android:textStyle="bold" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/custom_margin"
                android:background="@color/white">

                <TextView
                    android:id="@+id/txt_dashboard"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/custom_margin"
                    android:text="@string/dashboard"
                    android:textColor="@color/black"
                    android:textSize="@dimen/txt_size_14sp"
                    android:textStyle="bold" />

                <fragment
                    android:id="@+id/dashboard_fragment"
                    android:name="com.cpm.lorealbaMabeline.fragements.DashboardsFragment"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/txt_dashboard"
                    android:layout_margin="@dimen/custom_margin3dp" />
            </RelativeLayout>

            <LinearLayout
                android:id="@+id/rl_ba"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:layout_marginTop="@dimen/appbar_padding_top"
                android:orientation="vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/custom_margin"
                    android:text="@string/countermanu"
                    android:textColor="@color/black"
                    android:textSize="@dimen/txt_size_14sp"
                    android:textStyle="bold" />
                <fragment
                    android:id="@+id/counter_menu_fragment"
                    android:name="com.cpm.lorealbaMabeline.fragements.CounterMenuFragment"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="@dimen/custom_margin3dp" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/rl_ba2"
                android:layout_marginTop="@dimen/appbar_padding_top"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:orientation="vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/custom_margin"
                    android:text="@string/badviser_menu"
                    android:textColor="@color/black"
                    android:textSize="@dimen/txt_size_14sp"
                    android:textStyle="bold" />

                <fragment
                    android:id="@+id/badviser_fragment"
                    android:name="com.cpm.lorealbaMabeline.fragements.BAdvisorMenuFragment"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="@dimen/custom_margin3dp" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/rl_me"
                android:layout_marginTop="@dimen/appbar_padding_top"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:orientation="vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/custom_margin"
                    android:text="@string/mexpert_menu"
                    android:textColor="@color/black"
                    android:textSize="@dimen/txt_size_14sp"
                    android:textStyle="bold" />

                <fragment
                    android:name="com.cpm.lorealbaMabeline.fragements.MakeupExpertMenuFragment"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="@dimen/custom_margin3dp" />
            </LinearLayout>
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>
</LinearLayout>