<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#00000000"
    tools:application=".activity.DrawingActivity">

    <androidx.camera.view.PreviewView
        android:id="@+id/preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/image_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="matrix" />

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/back"
            android:layout_width="48dp"
            android:layout_height="match_parent"
            android:clickable="true"
            android:padding="8dp"
            android:src="@drawable/back" />

    </FrameLayout>

    <LinearLayout
        android:id="@+id/bottom_controls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#80000000"
        android:gravity="center"
        android:orientation="vertical"
        android:padding="16dp"
        app:layout_constraintBottom_toBottomOf="parent">

        <SeekBar
            android:id="@+id/seekbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"
            android:layout_marginEnd="32dp"
            android:layout_marginBottom="16dp"
            android:max="100"
            android:maxHeight="5dp"
            android:progress="0"
            android:progressDrawable="@drawable/progress_gradient"
            android:thumb="@drawable/progress_thumb" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/flash"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:padding="8dp"
                android:src="@drawable/un_flash" />

            <ImageView
                android:id="@+id/camera"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_marginStart="32dp"
                android:layout_marginEnd="32dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:padding="8dp"
                android:src="@drawable/camera" />

            <ImageView
                android:id="@+id/photo"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:padding="8dp"
                android:src="@drawable/photo" />

        </LinearLayout>

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>