<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ This file is part of the PhotoEditor Software Development Kit.
  ~
  ~ Copyright (C) 2019 img.ly GmbH <contact@img.ly>
  ~ All rights reserved.
  ~
  ~ Redistribution and use in source and binary forms, without
  ~ modification, are permitted provided that the following license agreement
  ~ is approved and a legal/financial contract was signed by the user.
  ~
  ~ The license agreement can be found under the following link:
  ~
  ~ https://www.photoeditorsdk.com/LICENSE.txt
  -->



<RelativeLayout
    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/rootView"
    style="@style/Imgly.PESDK.Camera">

    <RelativeLayout
        android:id="@+id/cameraHolder"
        style="@style/Imgly.PESDK.Camera.CameraPreview">
        <ly.img.android.acs.CameraView
            android:id="@+id/cameraView"
            app:header="@id/imglyActionBar"
            app:footer="@id/filterBar"
            style="@style/Imgly.PESDK.Camera.CameraPreview.Surface"/>

        <ly.img.android.acs.FocusRectView
            android:id="@+id/FocusView"
            style="@style/Imgly.PESDK.Camera.CameraPreview.Focus"/>
    </RelativeLayout>
    <RelativeLayout
        android:id="@+id/cameraUi"
        style="@style/Imgly.PESDK.Camera.UI">
        <RelativeLayout
            android:id="@+id/imglyActionBar"
            style="@style/Imgly.PESDK.Camera.UI.Header">
            <LinearLayout
                android:id="@+id/flashButton"
                style="@style/Imgly.PESDK.Camera.UI.Header.Button.FlashButton">
                <ly.img.android.pesdk.ui.widgets.AutoRotateImageSource
                    android:id="@+id/flashButtonIcon"
                    style="@style/Imgly.PESDK.Camera.UI.Header.Button.FlashButton.Icon"/>
                <ly.img.android.pesdk.ui.widgets.AutoRotateLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center">
                    <TextView
                        android:id="@+id/flashButtonLabel"
                        style="@style/Imgly.PESDK.Camera.UI.Header.Button.FlashButton.Label"/>
                </ly.img.android.pesdk.ui.widgets.AutoRotateLayout>
            </LinearLayout>
            <ToggleButton
                android:id="@+id/hdrButton"
                style="@style/Imgly.PESDK.Camera.UI.Header.Button.HDRButton"/>
            <ly.img.android.pesdk.ui.widgets.AutoRotateImageSource
                android:id="@+id/switchCameraButton"
                style="@style/Imgly.PESDK.Camera.UI.Header.Button.SwitchCameraButton"/>
        </RelativeLayout>
        <LinearLayout
            android:id="@+id/footer"
            style="@style/Imgly.PESDK.Camera.UI.Footer">
            <ly.img.android.pesdk.ui.widgets.SeekSlider
                android:id="@+id/seekBar"
                style="@style/Imgly.PESDK.Camera.UI.Footer.SeekSlider.Transparent"/>
            <LinearLayout
                android:id="@+id/filterBar"
                style="@style/Imgly.PESDK.Camera.UI.Footer.Container">
                <ly.img.android.pesdk.ui.widgets.AutoRotateLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    tools:ignore="RelativeOverlap">
                    <ly.img.android.pesdk.ui.activity.widgets.buttons.GalleryButton
                        android:id="@+id/galleryButton"
                        style="@style/Imgly.PESDK.Camera.UI.Footer.Button.GalleryButton"/>
                </ly.img.android.pesdk.ui.widgets.AutoRotateLayout>
                <Space
                    android:layout_weight="1"
                    android:layout_width="0dp"
                    android:layout_height="1dp"/>
                <ly.img.android.pesdk.ui.activity.widgets.buttons.ShutterButton
                    android:id="@+id/shutterButton"
                    style="@style/Imgly.PESDK.Camera.UI.Footer.Button.ShutterButton"/>
                <Space
                    android:layout_weight="1"
                    android:layout_width="0dp"
                    android:layout_height="1dp"/>
                <ly.img.android.pesdk.ui.activity.widgets.buttons.ExpandToggleButton
                    android:id="@+id/show_filter_button"
                    style="@style/Imgly.PESDK.Camera.UI.Footer.Button.FilterButton"/>
            </LinearLayout>
            <ly.img.android.pesdk.ui.widgets.ExpandableView
                android:id="@+id/expandableView"
                style="@style/Imgly.PESDK.Camera.UI.Footer.ExpandableContainer">
                <ly.img.android.pesdk.ui.widgets.HorizontalListView
                    android:id="@+id/filterList"
                    app:animateItems="true"
                    style="@style/Imgly.PESDK.Camera.UI.Footer.ExpandableContainer.FilterList"/>
            </ly.img.android.pesdk.ui.widgets.ExpandableView>
        </LinearLayout>
    </RelativeLayout>
</RelativeLayout>
