<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".camera.CameraActivity">

    <ProgressBar
        android:id="@+id/progressBar"
        style="?android:attr/progressBarStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="130dp"
        android:layout_marginBottom="124dp"
        android:visibility="invisible"
        app:layout_constraintBottom_toTopOf="@+id/infoPanel"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintVertical_bias="1.0" />

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

    <Space
        android:id="@+id/space"
        android:layout_width="16dp"
        android:layout_height="1dp"
        app:layout_constraintBottom_toBottomOf="@+id/capturebtn_camera_activity"
        app:layout_constraintEnd_toStartOf="@+id/capturebtn_camera_activity"
        app:layout_constraintTop_toTopOf="@+id/capturebtn_camera_activity" />

    <View
        android:id="@+id/transparent_layout"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#88676767"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <TextView
        android:id="@+id/infoPanel"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="70dp"
        android:layout_marginEnd="70dp"
        android:layout_marginBottom="240dp"
        android:background="@drawable/rounded_corners"
        android:padding="8dp"
        android:visibility="invisible"
        android:text="@string/need_all_green_dots_to_start_taking_pictures"
        android:textAlignment="center"
        android:textColor="#80000000"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <ImageView
        android:id="@+id/ivFlash"
        android:layout_width="38dp"
        android:layout_height="38dp"
        android:layout_marginStart="50dp"
        android:layout_marginBottom="100dp"
        android:background="@drawable/roundedcorner"
        android:src="@mipmap/ic_flash_off_white_24dp"
        android:textAlignment="center"
        android:scaleType="centerInside"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/switch_camera"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"/>

    <ImageView
        android:id="@+id/capturebtn_camera_activity"
        android:layout_width="0dp"
        android:layout_height="80dp"
        android:layout_marginStart="128dp"
        android:layout_marginEnd="32dp"
        android:layout_marginBottom="80dp"
        android:adjustViewBounds="true"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:contentDescription="@string/camera_capture_button"
        android:scaleType="centerInside"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/switch_camera"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/ic_camera_icon" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.5" />

    <LinearLayout
        android:id="@+id/linearLayout_alpha"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="25dp"
        android:layout_marginEnd="25dp"
        android:layout_marginBottom="10dp"
        android:orientation="vertical"
        android:visibility="invisible"
        app:layout_constraintBottom_toTopOf="@+id/infoPanel"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"/>

    <TextView
        android:id="@+id/tvImageBlurr"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="387dp"
        android:text="@string/no_face_detected"
        android:textColor="@color/red"
        android:textSize="25sp"
        android:gravity="center"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@+id/texture" />

    <ImageButton
        android:id="@+id/switch_camera"
        android:layout_width="38dp"
        android:layout_height="38dp"
        android:layout_marginBottom="100dp"
        android:layout_marginEnd="50dp"
        android:background="@drawable/roundedcorner"
        android:contentDescription="@string/switch_camera"
        android:src="@drawable/outline_flip_camera_android_24"
        android:textAlignment="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>