<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/black"
        android:orientation="vertical"
        tools:theme="@style/TransparentTheme">

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

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@color/mdtp_transparent_black"
            app:layout_constraintBottom_toBottomOf="parent"
            android:fitsSystemWindows="true">

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/switchCamera"
                style="?attr/floatingActionButtonSmallSecondaryStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/take_photo_switch_camera"
                app:layout_constraintBottom_toBottomOf="@id/takePhoto"
                app:layout_constraintEnd_toStartOf="@id/takePhoto"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="@id/takePhoto"
                tools:srcCompat="@drawable/ic_camera_front_24" />

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/takePhoto"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/fab_margin"
                android:contentDescription="@string/take_photo"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/toggle_torch"
                app:layout_constraintStart_toEndOf="@id/switchCamera"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@drawable/ic_photo_camera_24" />

            <com.google.android.material.floatingactionbutton.FloatingActionButton
                android:id="@+id/toggle_torch"
                style="?attr/floatingActionButtonSmallSecondaryStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:contentDescription="@string/take_photo_toggle_torch"
                app:layout_constraintBottom_toBottomOf="@id/takePhoto"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/takePhoto"
                app:layout_constraintTop_toTopOf="@id/takePhoto"
                tools:srcCompat="@drawable/ic_flash_on_24" />
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>