<?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:id="@+id/MainFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        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="240dp"
            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="@color/white"
                app:expandedTitleTextAppearance="@style/TextAppearance.AppCompat.Headline"
                app:layout_scrollFlags="scroll|exitUntilCollapsed"
                app:titleEnabled="false">

                <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="wrap_content"
                    android:background="@color/transparent"
                    app:contentInsetLeft="0dp"
                    app:contentInsetStart="0dp"
                    app:layout_collapseMode="pin">

                    <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" />

                        <ImageView
                            android:id="@+id/favourite"
                            android:layout_width="40dp"
                            android:layout_height="40dp"
                            android:layout_alignParentRight="true"
                            android:layout_margin="10dp"
                            android:background="@drawable/button_round_2"
                            android:backgroundTint="@color/white"
                            android:padding="10dp"
                            android:src="@drawable/ic_love"
                            android:tint="@color/gray" />
                    </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">

                <customfonts.TextViewSFProDisplayMedium
                    android:id="@+id/title"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginLeft="10dp"
                    android:layout_marginTop="20dp"
                    android:layout_marginRight="10dp"
                    android:text="@string/app_name"
                    android:textColor="@color/colorPrimary"
                    android:textSize="20dp" />

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

                    <customfonts.TextViewSFProDisplayRegular
                        android:id="@+id/tanggal"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_above="@+id/name"
                        android:text="20 agustus 2019"
                        android:textColor="@color/black"
                        android:textSize="15dp" />

                    <customfonts.TextViewSFProDisplayMedium
                        android:id="@+id/category"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_above="@+id/name"
                        android:layout_marginLeft="10dp"
                        android:layout_weight="1"
                        android:gravity="right"
                        android:text="Kategori Berita"
                        android:textColor="@color/black"
                        android:textSize="15dp" />
                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="0.1dp"
                    android:layout_margin="10dp"
                    android:background="@color/gray" />

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

                <WebView
                    android:id="@+id/description"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="10dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    tools:ignore="WebViewLayout" />
            </LinearLayout>


        </androidx.core.widget.NestedScrollView>


        <FrameLayout
            android:id="@+id/rating_sheet"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_behavior="@string/bottom_sheet_behavior" />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <RelativeLayout
        android:id="@+id/rlprogress"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:clickable="true"
        android:visibility="gone">

        <de.hdodenhof.circleimageview.CircleImageView
            android:id="@+id/profileimage"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_centerInParent="true"
            android:src="@color/white" />

        <customfonts.TextViewSFProDisplayRegular
            android:id="@+id/textprogress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/profileimage"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="20dp"
            android:text="@string/waiting_pleaseWait"
            android:textColor="@color/black" />


        <ProgressBar
            android:layout_width="120dp"
            android:layout_height="120dp"
            android:layout_centerInParent="true" />

        <LinearLayout
            android:id="@+id/lllogo"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:orientation="vertical">

            <ImageView
                android:id="@+id/logo"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:elevation="10dp"
                android:src="@drawable/logo" />
        </LinearLayout>

    </RelativeLayout>


</RelativeLayout>