<?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="@color/background_dark"
    tools:context=".activity.ImageTraceActivity">

    <androidx.camera.view.PreviewView
        android:id="@+id/preview"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/image_full"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:scaleType="matrix"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/back"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:layout_marginTop="28dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:padding="4dp"
        android:src="@drawable/back"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:tint="@color/white" />

    <ImageView
        android:id="@+id/reversal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="28dp"
        android:layout_marginEnd="20dp"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:contentDescription="Reverse"
        android:padding="4dp"
        android:src="@drawable/reversal_off"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab_capture"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="32dp"
        android:contentDescription="Capture"
        android:src="@drawable/camera"
        app:backgroundTint="@color/design_default_color_primary"
        app:fabSize="normal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:tint="@color/white" />

    <LinearLayout
        android:id="@+id/side_toolbar_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:background="@drawable/rounded_transparent_background"
        android:orientation="vertical"
        android:padding="8dp"
        app:layout_constraintBottom_toTopOf="@id/fab_capture"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.5">

        <ImageView
            android:id="@+id/light"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:layout_marginBottom="8dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="Flash"
            android:padding="8dp"
            android:src="@drawable/flash_off"
            app:tint="@color/white" />

        <ImageView
            android:id="@+id/import_image"
            android:layout_width="48dp"
            android:layout_height="48dp"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:contentDescription="Gallery"
            android:padding="8dp"
            android:src="@drawable/photo"
            app:tint="@color/white" />
    </LinearLayout>

    <FrameLayout
        android:id="@+id/seek_bar_background"
        android:layout_width="280dp"
        android:layout_height="33dp"
        android:layout_marginTop="24dp"
        android:background="@drawable/rounded_transparent_background"
        android:padding="10dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/back">

        <ImageView
            android:id="@+id/start_icon"
            android:layout_width="10dp"
            android:layout_height="10dp"
            android:layout_gravity="start|center_vertical"
            android:layout_marginEnd="5dp"
            android:src="@drawable/subtract"
            app:tint="@color/white" />

        <SeekBar
            android:id="@+id/seekbar"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="5dp"
            android:layout_marginEnd="5dp"
            android:max="100"
            android:maxHeight="5dp"
            android:progress="0"
            android:progressDrawable="@drawable/seek_bar_color_white"
            android:thumb="@drawable/seekbar_thumb_white" />

        <ImageView
            android:id="@+id/end_icon"
            android:layout_width="10dp"
            android:layout_height="10dp"
            android:layout_gravity="end|center_vertical"
            android:layout_marginStart="5dp"
            android:src="@drawable/add"
            app:tint="@color/white" />

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>