<?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/calmWhite"
    android:orientation="vertical"
    tools:context=".monitoring.Upload">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/rel1"
        android:backgroundTint="@color/Dark"
        android:orientation="vertical"
        android:background="@drawable/top_popup_sheet">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="10dp"
            android:paddingStart="20dp"
            android:textSize="16sp"
            android:textColor="#fff"
            android:fontFamily="@font/lato_regular"
            android:text="Unggah Data Kebun"/>

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="end">
            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/animRender"
                android:layout_width="100dp"
                android:layout_marginEnd="20dp"
                android:background="@color/Dark"
                android:layout_height="100dp"
                app:lottie_rawRes="@raw/upload_monitoring1"
                app:lottie_loop="true"
                app:lottie_autoPlay="true"/>
        </RelativeLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="end"
            android:layout_marginEnd="20dp"
            android:textSize="12sp"
            android:textColor="#fff"
            android:fontFamily="sans-serif-light"
            android:text="Unggah data informasi kebun" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="end"
            android:layout_marginEnd="20dp"
            android:textSize="12sp"
            android:textColor="#fff"
            android:fontFamily="sans-serif-light"
            android:text="kapan saja dan dimana saja"
            android:layout_marginBottom="20dp"/>

    </LinearLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_below="@id/rel1"
        android:layout_height="wrap_content">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/rel1"
            android:orientation="vertical">
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:id="@+id/textView6"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Distrik*"
                    android:textColor="@color/Dark"
                    android:textSize="14sp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <RelativeLayout
                    android:id="@+id/relDistrik"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:padding="5dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/textView6">

                    <EditText
                        android:id="@+id/edtDistrict"
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:backgroundTint="@color/transparent"
                        android:fontFamily="sans-serif-light"
                        android:hint="Pilih Distrik"
                        android:inputType="text"
                        android:textColor="@color/Gray3"
                        android:textColorHint="@color/Gray3"
                        android:textSize="14sp" />
                </RelativeLayout>

                <TextView
                    android:id="@+id/textView7"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Kebun*"
                    android:textColor="@color/Dark"
                    android:textSize="14sp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/relDistrik" />

                <RelativeLayout
                    android:id="@+id/relKebun"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:padding="5dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/textView7">

                    <EditText
                        android:id="@+id/edtKebun"
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:backgroundTint="@color/transparent"
                        android:fontFamily="sans-serif-light"
                        android:hint="Pilih Kebun"
                        android:inputType="text"
                        android:textColor="@color/Gray3"
                        android:textColorHint="@color/Gray3"
                        android:textSize="14sp" />
                </RelativeLayout>

                <TextView
                    android:id="@+id/textView5"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Afdeling*"
                    android:textSize="14sp"
                    android:textColor="@color/Dark"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/relKebun" />

                <RelativeLayout
                    android:id="@+id/relAfdeling"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:padding="5dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/textView5">
                    <EditText
                        android:id="@+id/edtAfdeling"
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:inputType="text"
                        android:textSize="14sp"
                        android:fontFamily="sans-serif-light"
                        android:textColorHint="@color/Gray3"
                        android:textColor="@color/Gray3"
                        android:hint="Pilih Afdeling"
                        android:backgroundTint="@color/transparent" />
                </RelativeLayout>


                <TextView
                    android:id="@+id/txtJenis"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Pelaporan*"
                    android:textSize="14sp"
                    android:textColor="@color/Dark"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/relAfdeling" />

                <RelativeLayout
                    android:id="@+id/relLapor"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:padding="5dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/txtJenis">
                    <EditText
                        android:id="@+id/edtTipe"
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:inputType="text"
                        android:textSize="14sp"
                        android:fontFamily="sans-serif-light"
                        android:textColor="@color/Gray3"
                        android:textColorHint="@color/Gray3"
                        android:hint="Pilih Laporan"
                        android:backgroundTint="@color/transparent" />
                </RelativeLayout>

                <TextView
                    android:id="@+id/txtTipe"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Jenis Laporan*"
                    android:textSize="14sp"
                    android:textColor="@color/Dark"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/relLapor" />

                <RelativeLayout
                    android:id="@+id/relJLapor"
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:padding="5dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/txtTipe">
                    <EditText
                        android:id="@+id/edtJenis"
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:inputType="text"
                        android:textSize="14sp"
                        android:fontFamily="sans-serif-light"
                        android:textColorHint="@color/Gray3"
                        android:textColor="@color/Gray3"
                        android:hint="Pilih Jenis Laporan"
                        android:backgroundTint="@color/transparent" />
                </RelativeLayout>

                <TextView
                    android:id="@+id/blok"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Blok*"
                    android:textSize="14sp"
                    android:textColor="@color/Dark"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/relJLapor" />

                <RelativeLayout
                    android:id="@+id/relBlok"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/blok">
                    <EditText
                        android:id="@+id/blok_txt"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="10dp"
                        android:inputType="textCapSentences"
                        android:backgroundTint="@color/transparent"
                        android:textColorHint="@color/Gray3"
                        android:textSize="14sp"
                        android:textColor="@color/Gray3"
                        android:fontFamily="sans-serif-light"
                        android:hint="Masukkan blok" />
                </RelativeLayout>

                <TextView
                    android:id="@+id/deskrip"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp"
                    android:fontFamily="@font/lato_regular"
                    android:text="Deskripsi*"
                    android:textSize="14sp"
                    android:textColor="@color/Dark"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/relBlok" />

                <RelativeLayout
                    android:id="@+id/relDeskrip"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginLeft="10dp"
                    android:background="@drawable/round_spinner_list_data"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/deskrip">

                    <EditText
                        android:id="@+id/posting_txt"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="10dp"
                        android:layout_marginTop="10dp"
                        android:layout_marginEnd="10dp"
                        android:layout_marginBottom="10dp"
                        android:backgroundTint="@color/transparent"
                        android:fontFamily="sans-serif-light"
                        android:textColorHint="@color/Gray3"
                        android:textColor="@color/Gray3"
                        android:hint="Masukkan deskripsi"
                        android:inputType="textMultiLine|textCapSentences"
                        android:textSize="14sp" />
                </RelativeLayout>


            </androidx.constraintlayout.widget.ConstraintLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:fontFamily="@font/lato_regular"
                android:text="Bukti Foto*"
                android:textColor="@color/Dark"
                android:textSize="14sp" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="100dp">

                <ScrollView
                    android:id="@+id/scrollView2"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/mediaList"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:padding="10dp" />
                </ScrollView>
            </RelativeLayout>

        </LinearLayout>
    </ScrollView>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@id/layoutUpload"
        android:gravity="right">
        <com.getbase.floatingactionbutton.FloatingActionsMenu
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            app:fab_addButtonColorNormal="@color/YellowLight"
            app:fab_addButtonColorPressed="@color/Yellow"
            app:fab_addButtonPlusIconColor="@color/Dark"
            app:fab_addButtonSize="mini"
            app:fab_labelStyle="@style/customFab">

            <com.getbase.floatingactionbutton.FloatingActionButton
                android:id="@+id/bt_Add"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_colorNormal="@color/White"
                app:fab_colorPressed="@color/Gray1"
                app:fab_size="mini"
                app:fab_icon="@drawable/ic_camera"/>

            <com.getbase.floatingactionbutton.FloatingActionButton
                android:id="@+id/addPhotoGalery"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:fab_colorNormal="@color/White"
                app:fab_size="mini"
                app:fab_icon="@drawable/ic_image_file"/>
        </com.getbase.floatingactionbutton.FloatingActionsMenu>
    </RelativeLayout>

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

        <RelativeLayout
            android:layout_width="match_parent"
            android:gravity="center"
            android:background="@drawable/round_button_01"
            android:layout_margin="10dp"
            android:id="@+id/btnUpload"
            android:layout_height="match_parent">
            <TextView
                android:layout_margin="13dp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textSize="14sp"
                android:textStyle="bold"
                android:textAllCaps="false"
                android:textColor="@color/White"
                android:fontFamily="@font/lato_regular"
                android:text="Unggah Data" />
        </RelativeLayout>

    </LinearLayout>
</RelativeLayout>