<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true">

  <androidx.camera.view.PreviewView
      android:id="@+id/preview_view"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      app:layout_constraintTop_toTopOf="parent"
      app:layout_constraintBottom_toTopOf="@+id/control"/>

  <com.google.mlkit.vision.demo.GraphicOverlay
      android:id="@+id/graphic_overlay"
      android:layout_width="0dp"
      android:layout_height="0dp"
      app:layout_constraintLeft_toLeftOf="@id/preview_view"
      app:layout_constraintRight_toRightOf="@id/preview_view"
      app:layout_constraintTop_toTopOf="@id/preview_view"
      app:layout_constraintBottom_toBottomOf="@id/preview_view"/>

  <include
      android:id="@+id/settings_button"
      layout="@layout/settings_style"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:layout_constraintRight_toRightOf="@id/preview_view"
      app:layout_constraintTop_toTopOf="@id/preview_view" />

  <LinearLayout
      android:id="@id/control"
      android:layout_width="match_parent"
      android:layout_height="60dp"
      app:layout_constraintBottom_toBottomOf="parent"
      android:background="#000"
      android:orientation="horizontal">

    <ToggleButton
        android:id="@+id/facing_switch"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_gravity="center_vertical"
        android:background="@layout/toggle_style"
        android:checked="false"
        android:textOff=""
        android:textOn=""/>

    <Spinner
        android:id="@+id/spinner"
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content"
        android:layout_gravity="center"/>

  </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
