<?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"
    xmlns:shimmer="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/app_bar_layout"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:id="@+id/image"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fitsSystemWindows="true"
                android:scaleType="centerCrop"
                android:src="@drawable/image_placeholder"
                app:layout_collapseMode="parallax" />

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/transparent"
                app:contentInsetLeft="0dp"
                app:contentInsetStart="0dp"
                app:layout_collapseMode="pin"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

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

                    <ImageView
                        android:id="@+id/back_btn"
                        android:layout_width="40dp"
                        android:layout_height="40dp"
                        android:layout_alignParentLeft="true"
                        android:layout_margin="10dp"
                        android:background="@drawable/round_edittext_background"
                        android:backgroundTint="@color/white"
                        android:padding="10dp"
                        android:src="@drawable/ic_back"
                        android:tint="@color/black" />

                    <customfonts.TextViewSFProDisplayMedium
                        android:id="@+id/tutup"
                        android:layout_width="wrap_content"
                        android:layout_height="30dp"
                        android:visibility="gone"
                        android:layout_alignParentRight="true"
                        android:layout_margin="10dp"
                        android:background="@drawable/rounded_corners_button_red"
                        android:gravity="center"
                        android:paddingLeft="10dp"
                        android:paddingRight="10dp"
                        android:text="closed"
                        android:textColor="@color/white" />
                </RelativeLayout>
            </androidx.appcompat.widget.Toolbar>



        </com.google.android.material.appbar.CollapsingToolbarLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/white"
        android:clipToPadding="false"
        android:scrollbars="none"
        android:scrollingCache="true"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="30dp"
                    android:layout_marginTop="5dp"
                    android:orientation="horizontal"
                    android:paddingLeft="10dp"
                    android:paddingRight="10dp">

                    <ImageView
                        android:id="@+id/partner"
                        android:layout_width="120dp"
                        android:layout_height="30dp"
                        android:src="@drawable/partner"
                        android:visibility="gone" />

                    <ImageView
                        android:id="@+id/promo"
                        android:layout_width="85dp"
                        android:layout_height="30dp"
                        android:src="@drawable/promodetail"
                        android:visibility="gone" />

                </LinearLayout>

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

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="30dp"
                        android:layout_marginTop="5dp"
                        android:orientation="horizontal"
                        android:paddingLeft="10dp">

                        <ImageView
                            android:id="@+id/partnershim"
                            android:layout_width="120dp"
                            android:layout_height="30dp"
                            android:src="@drawable/partner"
                            android:tint="@color/light_gray"
                            android:visibility="visible" />

                    </LinearLayout>
                </com.facebook.shimmer.ShimmerFrameLayout>
                <com.facebook.shimmer.ShimmerFrameLayout
                    android:id="@+id/shimmerbadgepromo"
                    android:layout_toRightOf="@id/shimmerbadge"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:orientation="horizontal"
                    shimmer:duration="800">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="30dp"
                        android:layout_marginTop="5dp"
                        android:orientation="horizontal"
                        android:paddingRight="10dp">

                        <ImageView
                            android:id="@+id/promoshim"
                            android:layout_width="85dp"
                            android:layout_height="30dp"
                            android:src="@drawable/promodetail"
                            android:tint="@color/light_gray"
                            android:visibility="visible" />

                    </LinearLayout>
                </com.facebook.shimmer.ShimmerFrameLayout>

            </RelativeLayout>

            <LinearLayout
                android:id="@+id/lldetail"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:visibility="gone">

                <customfonts.TextViewSFProDisplayMedium
                    android:id="@+id/nama"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:paddingLeft="10dp"
                    android:paddingRight="10dp"
                    android:text="Nasi Goreng Mas Gondrong"
                    android:textSize="18dp" />

                <customfonts.TextViewSFProDisplayRegular
                    android:id="@+id/kategoridistance"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingLeft="10dp"
                    android:paddingRight="10dp"
                    android:text="Makanan \u2022 2.1 Km"
                    android:textSize="15dp" />

                <customfonts.TextViewSFProDisplayRegular
                    android:id="@+id/hours"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingLeft="10dp"
                    android:paddingRight="10dp"
                    android:text="Open Hour : 09:00 - 23:00"
                    android:textSize="15dp" />
            </LinearLayout>

            <com.facebook.shimmer.ShimmerFrameLayout
                android:id="@+id/shimmerdetail"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginTop="10dp"
                android:orientation="horizontal"
                shimmer:duration="800">

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

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

                        <include
                            layout="@layout/shimerpromo"
                            android:layout_width="280dp"
                            android:layout_height="20dp"
                            android:layout_marginBottom="5dp" />

                        <include
                            layout="@layout/shimerpromo"
                            android:layout_width="150dp"
                            android:layout_height="20dp"
                            android:layout_marginBottom="5dp" />

                        <include
                            layout="@layout/shimerpromo"
                            android:layout_width="200dp"
                            android:layout_height="20dp" />
                    </LinearLayout>
                </LinearLayout>

            </com.facebook.shimmer.ShimmerFrameLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="0.5dp"
                android:layout_marginTop="10dp"
                android:background="@color/gray"
                android:paddingLeft="@dimen/spacing_mlarge"
                android:paddingRight="@dimen/spacing_mlarge" />

            <customfonts.TextViewSFProDisplayMedium
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:paddingLeft="10dp"
                android:paddingRight="10dp"
                android:text="Menu"
                android:textSize="18dp" />

            <LinearLayout
                android:id="@+id/llmerchantnear"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/white"
                android:orientation="vertical"
                android:paddingBottom="100dp">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/catmerchantnear"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:layout_margin="10dp"
                    android:background="@color/white"
                    android:visibility="gone" />

                <customfonts.TextViewSFProDisplayMedium
                    android:id="@+id/nodatanear"
                    android:layout_width="match_parent"
                    android:layout_height="100dp"
                    android:gravity="center"
                    android:text="NO MERCHANT!"
                    android:visibility="gone" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/merchantnear"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:background="@color/white"
                    android:visibility="gone" />

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

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

                        <LinearLayout
                            android:id="@+id/shimlistcatnear"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal">

                            <include
                                layout="@layout/shimerpromo"
                                android:layout_width="80dp"
                                android:layout_height="25dp"
                                android:layout_marginTop="10dp"
                                android:layout_marginBottom="10dp" />

                            <include
                                layout="@layout/shimerpromo"
                                android:layout_width="100dp"
                                android:layout_height="25dp"
                                android:layout_marginTop="10dp"
                                android:layout_marginBottom="10dp" />

                            <include
                                layout="@layout/shimerpromo"
                                android:layout_width="60dp"
                                android:layout_height="25dp"
                                android:layout_marginTop="10dp"
                                android:layout_marginBottom="10dp" />

                            <include
                                layout="@layout/shimerpromo"
                                android:layout_width="80dp"
                                android:layout_height="25dp"
                                android:layout_marginTop="10dp"
                                android:layout_marginBottom="10dp" />

                            <include
                                layout="@layout/shimerpromo"
                                android:layout_width="100dp"
                                android:layout_height="25dp"
                                android:layout_marginTop="10dp"
                                android:layout_marginBottom="10dp" />

                            <include
                                layout="@layout/shimerpromo"
                                android:layout_width="60dp"
                                android:layout_height="25dp"
                                android:layout_marginTop="10dp"
                                android:layout_marginBottom="10dp" />
                        </LinearLayout>

                        <LinearLayout
                            android:id="@+id/shimlistnear"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="vertical">

                            <include
                                layout="@layout/shimerlistdetail"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content" />

                            <include
                                layout="@layout/shimerlistdetail"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content" />

                            <include
                                layout="@layout/shimerlistdetail"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content" />
                        </LinearLayout>
                    </LinearLayout>

                </com.facebook.shimmer.ShimmerFrameLayout>

                <RelativeLayout
                    android:id="@+id/rlnodata"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:visibility="gone">

                    <ImageView
                        android:id="@+id/nodataimage"
                        android:layout_width="match_parent"
                        android:layout_height="150dp"
                        android:layout_centerInParent="true"
                        android:src="@drawable/slide_one" />

                    <customfonts.TextViewSFProDisplayMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@+id/nodataimage"
                        android:layout_centerHorizontal="true"
                        android:text="No Data"
                        android:textColor="@color/black"
                        android:textSize="20dp">

                    </customfonts.TextViewSFProDisplayMedium>


                </RelativeLayout>

            </LinearLayout>

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/spacing_mlarge"
        android:clickable="true"
        app:backgroundTint="@color/white"
        app:fabCustomSize="80dp"
        app:layout_anchor="@id/app_bar_layout"
        app:layout_anchorGravity="bottom|right|end"
        app:srcCompat="@drawable/mapfloat" />

    <androidx.cardview.widget.CardView
        android:id="@+id/price_container"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_gravity="bottom"
        android:layout_margin="15dp"
        android:visibility="visible"
        app:cardBackgroundColor="@color/colorgradient"
        app:cardCornerRadius="8dp"
        app:cardElevation="8dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="8dp">

            <customfonts.TextViewSFProDisplayMedium
                android:id="@+id/qty_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:gravity="center"
                android:text="1 item"
                android:textColor="@color/white"
                android:textSize="12dp" />

            <View
                android:id="@+id/cost_line"
                android:layout_width="1dp"
                android:layout_height="match_parent"
                android:layout_marginLeft="8dp"
                android:layout_toRightOf="@+id/qty_text"
                android:background="@color/white" />

            <customfonts.TextViewSFProDisplayMedium
                android:id="@+id/estimated_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/cost_text"
                android:layout_alignStart="@+id/cost_text"
                android:text="Detail Order"
                android:textColor="@color/white"
                android:textSize="14sp" />

            <customfonts.TextViewSFProDisplayMedium
                android:id="@+id/cost_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dp"
                android:layout_toRightOf="@+id/cost_line"
                android:text="Rp. 23000"
                android:textColor="@color/white"
                android:textSize="13sp" />

            <ImageView
                android:id="@+id/food_book"
                android:layout_width="25dp"
                android:layout_height="25dp"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:src="@drawable/ic_cart"
                android:tint="@color/white" />
        </RelativeLayout>
    </androidx.cardview.widget.CardView>

    <FrameLayout
        android:id="@+id/rlnotif"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/red"
        android:elevation="15dp"
        android:visibility="gone">

        <customfonts.TextViewSFProDisplayRegular
            android:id="@+id/textnotif"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:gravity="center"
            android:textColor="@color/white" />

    </FrameLayout>

    <FrameLayout
        android:id="@+id/bottom_sheet"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/black"
        app:layout_behavior="@string/bottom_sheet_behavior" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>