<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/_50sdp"
        android:gravity="center|start">


        <LinearLayout
            android:layout_weight="1"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:gravity="center_vertical">

            <ImageView
                android:id="@+id/back"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_centerVertical="true"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:padding="10dp"
                android:src="@drawable/ic_arrow_back" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:paddingEnd="8dp"
                android:text="Remove Background"
                android:textColor="@android:color/black"
                android:textSize="18sp" />

        </LinearLayout>

        <androidx.cardview.widget.CardView
            android:id="@+id/btnDone"
            android:layout_width="80dp"
            android:layout_height="30dp"
            android:layout_gravity="center"
            android:layout_marginEnd="10dp"
            android:clickable="true"
            android:elevation="@dimen/_5sdp"
            android:foreground="?android:selectableItemBackground"
            app:cardCornerRadius="5dp"
            app:layout_constraintEnd_toEndOf="parent">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/rounded_bg">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:text="Done"
                    android:textColor="@color/black"
                    android:textSize="14sp" />

            </RelativeLayout>

        </androidx.cardview.widget.CardView>

    </LinearLayout>

    <RelativeLayout

        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1">

        <com.visticsolution.posterbanao.editor.imagecroper.views.TouchImageView
            android:id="@+id/ivImage"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <ProgressBar
            android:id="@+id/progressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:visibility="gone" />


    </RelativeLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:gravity="center"
        android:orientation="horizontal">

        <androidx.cardview.widget.CardView
            android:id="@+id/btnEdit"
            android:layout_width="100dp"
            android:layout_height="35dp"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:layout_marginStart="20dp"
            android:layout_marginTop="15dp"
            android:layout_marginEnd="@dimen/_15sdp"
            android:layout_marginBottom="15dp"
            android:layout_weight="1"
            android:clickable="true"
            android:elevation="@dimen/_5sdp"
            android:foreground="?android:selectableItemBackground"
            app:cardCornerRadius="5dp">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/rounded_bg">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:text="Edit"
                    android:textColor="@color/black"
                    android:textSize="16sp" />

            </RelativeLayout>
        </androidx.cardview.widget.CardView>

        <androidx.cardview.widget.CardView
            android:id="@+id/btnBgRemove"
            android:layout_width="100dp"
            android:layout_height="35dp"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center"
            android:layout_marginStart="20dp"
            android:layout_marginEnd="@dimen/_15sdp"
            android:layout_weight="1"
            android:clickable="true"
            android:elevation="@dimen/_5sdp"
            android:foreground="?android:selectableItemBackground"
            app:cardCornerRadius="5dp">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@drawable/rounded_bg">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_centerInParent="true"
                    android:text="Remove Bg"
                    android:textColor="@color/black"
                    android:textSize="16sp" />

            </RelativeLayout>
        </androidx.cardview.widget.CardView>


    </LinearLayout>


</LinearLayout>