<?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"
    xmlns:shimmer="http://schemas.android.com/tools"
    android:background="@color/white"
    android:orientation="vertical">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:layout_alignParentTop="true"
        android:background="@color/white"
        app:contentInsetLeft="0dp"
        app:contentInsetStart="0dp"
        android:elevation="5dp">

        <FrameLayout
            android:id="@+id/header"
            android:layout_width="match_parent"
            android:layout_height="55dp"
            android:background="@color/white"
            android:elevation="5dp">

            <ImageView
                android:id="@+id/back_btn"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="10dp"
                android:src="@drawable/ic_back"
                android:tint="@color/black" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginLeft="40dp"
                android:layout_marginRight="10dp"
                android:orientation="horizontal"
                android:layout_gravity="center_vertical">

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:layout_weight="1">

                <customfonts.TextViewSFProDisplayMedium
                    android:id="@+id/namacategory"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="10dp"
                    android:text="Main Dish"
                    android:textColor="@color/black"
                    android:textSize="18dp"
                    android:gravity="center_vertical"/>

                <ImageView
                    android:id="@+id/editcategory"
                    android:layout_width="25dp"
                    android:layout_height="25dp"
                    android:layout_marginLeft="5dp"
                    android:src="@drawable/ic_edits"
                    android:padding="5dp"/>

                </LinearLayout>

                <ImageView
                    android:id="@+id/hapuscategory"
                    android:layout_width="25dp"
                    android:layout_height="25dp"
                    android:src="@drawable/ic_trash"
                    android:padding="5dp"
                    android:layout_marginRight="10dp"/>


            </LinearLayout>

        </FrameLayout>

    </androidx.appcompat.widget.Toolbar>

    <androidx.core.widget.NestedScrollView
        android:layout_below="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/buttonadd">

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:background="@color/white"
                android:layout_marginTop="8dp">

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

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/menu"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:visibility="gone"/>

                    <com.facebook.shimmer.ShimmerFrameLayout
                        android:id="@+id/shimmermenu"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:orientation="vertical"
                        shimmer:duration="800">

                        <!-- Adding 7 rows of placeholders -->
                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_margin="10dp"
                            android:orientation="vertical">

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

                            <View
                                android:layout_width="match_parent"
                                android:layout_height="15dp" />

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

                            <View
                                android:layout_width="match_parent"
                                android:layout_height="15dp" />

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

                            <View
                                android:layout_width="match_parent"
                                android:layout_height="15dp" />

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

                            <View
                                android:layout_width="match_parent"
                                android:layout_height="15dp" />

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

                            <View
                                android:layout_width="match_parent"
                                android:layout_height="15dp" />

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

                        </LinearLayout>

                    </com.facebook.shimmer.ShimmerFrameLayout>

                </LinearLayout>

            </LinearLayout>

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

    <LinearLayout
        android:id="@+id/buttonadd"
        android:layout_width="match_parent"
        android:layout_height="55dp"
        android:layout_alignParentBottom="true"
        android:background="@color/white"
        android:elevation="5dp">

        <customfonts.Button_SF_Pro_Display_Medium
            android:id="@+id/buttonaddmenu"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginLeft="10dp"
            android:layout_marginRight="10dp"
            android:background="@drawable/button_round_1"
            android:text="Add Menu"
            android:textAllCaps="false"
            android:textColor="@color/white"
            android:textSize="18dp"
            android:layout_gravity="center_vertical"/>

    </LinearLayout>

</RelativeLayout>
