<?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/viewGroup_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true"
    android:background="@color/black"
    android:fitsSystemWindows="true"
    android:keepScreenOn="true"
    tools:context="com.za.ui.camera.ZdCameraXActivity">


    <androidx.camera.view.PreviewView
        android:id="@+id/viewFinder"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="15dp"
        android:paddingTop="15dp"
        app:layout_constraintBottom_toTopOf="@+id/tv_take_photo"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/iv_back" />

    <View
        android:id="@+id/view_preview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/black"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />


    <androidx.constraintlayout.utils.widget.ImageFilterView
        android:id="@+id/iv_preview"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginTop="30dp"
        android:layout_marginBottom="15dp"
        app:layout_constraintBottom_toTopOf="@+id/iv_confirm"
        app:layout_constraintEnd_toEndOf="@id/view_preview"
        app:layout_constraintStart_toStartOf="@id/view_preview"
        app:layout_constraintTop_toTopOf="@id/view_preview" />


    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/iv_cancel"
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:layout_marginBottom="40dp"
        android:background="@drawable/shape_gray"
        android:padding="20dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/ic_back" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/iv_confirm"
        android:layout_width="70dp"
        android:layout_height="70dp"
        android:layout_marginBottom="40dp"
        android:background="@drawable/shape_white"
        android:padding="20dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/ic_check" />

    <androidx.appcompat.widget.AppCompatTextView
        android:id="@+id/tv_take_photo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="10dp"
        android:text="点击拍照"
        android:textColor="@color/white"
        app:layout_constraintBottom_toTopOf="@id/iv_takePhoto"
        app:layout_constraintEnd_toEndOf="@id/iv_takePhoto"
        app:layout_constraintStart_toStartOf="@id/iv_takePhoto" />

    <com.za.ui.camera.TakePhotoButtonView
        android:id="@+id/iv_takePhoto"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:layout_marginBottom="40dp"
        android:src="@drawable/selected_take_photo"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/iv_back"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="@color/ps_color_grey_3e"
        android:padding="10dp"
        android:paddingTop="10dp"
        android:scaleType="centerCrop"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_back" />

    <androidx.appcompat.widget.AppCompatSeekBar
        android:id="@+id/slider_exposureState"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@color/ps_color_grey_3e"
        android:padding="20dp"
        android:thumbOffset="5dp"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@id/iv_back"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/iv_back"
        app:layout_constraintTop_toTopOf="@id/iv_back" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/group_opera"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="visible"
        app:constraint_referenced_ids="iv_takePhoto,iv_back,slider_exposureState,iv_flash,iv_changeCamera,tv_take_photo,iv_flash,iv_changeCamera" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/iv_flash"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_marginEnd="40dp"
        android:padding="15dp"
        android:src="@drawable/selected_flash"
        app:layout_constraintBottom_toBottomOf="@id/iv_takePhoto"
        app:layout_constraintEnd_toStartOf="@id/iv_takePhoto"
        app:layout_constraintTop_toTopOf="@id/iv_takePhoto" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/iv_changeCamera"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_marginStart="40dp"
        android:layout_marginTop="10dp"
        android:padding="15dp"
        android:scaleType="centerCrop"
        android:src="@drawable/picture_ic_camera"
        app:layout_constraintStart_toEndOf="@id/iv_takePhoto"
        app:layout_constraintTop_toTopOf="@id/iv_takePhoto" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/group_preview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="view_preview,iv_preview,iv_cancel,iv_confirm" />

</androidx.constraintlayout.widget.ConstraintLayout>