<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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:background="@null"
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <Button
        android:id="@+id/save"
        style="@android:style/Widget.DeviceDefault.Button.Colored"
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:layout_marginStart="8dp"
        android:background="@drawable/overlay_button_background"
        android:paddingHorizontal="24dp"
        android:text="@string/app_clips_save_add_to_note"
        android:textColor="?android:textColorSecondary"
        app:layout_constraintBottom_toTopOf="@id/preview"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <Button
        android:id="@+id/cancel"
        style="@android:style/Widget.DeviceDefault.Button.Colored"
        android:layout_width="wrap_content"
        android:layout_height="48dp"
        android:layout_marginStart="8dp"
        android:background="@drawable/overlay_button_background"
        android:paddingHorizontal="24dp"
        android:text="@android:string/cancel"
        android:textColor="?android:textColorSecondary"
        app:layout_constraintBottom_toTopOf="@id/preview"
        app:layout_constraintStart_toEndOf="@id/save"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/preview"
        android:layout_width="0px"
        android:layout_height="0px"
        android:paddingHorizontal="48dp"
        android:paddingTop="8dp"
        android:paddingBottom="42dp"
        android:contentDescription="@string/screenshot_preview_description"
        app:layout_constrainedHeight="true"
        app:layout_constrainedWidth="true"
        app:layout_constraintTop_toBottomOf="@id/save"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        tools:background="?android:colorBackground"
        tools:minHeight="100dp"
        tools:minWidth="100dp" />

    <com.android.systemui.screenshot.scroll.CropView
        android:id="@+id/crop_view"
        android:layout_width="0px"
        android:layout_height="0px"
        android:paddingTop="8dp"
        android:paddingBottom="42dp"
        app:layout_constrainedHeight="true"
        app:layout_constrainedWidth="true"
        app:layout_constraintTop_toTopOf="@id/preview"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:handleThickness="@dimen/screenshot_crop_handle_thickness"
        app:handleColor="?android:attr/colorAccent"
        app:scrimColor="?android:colorBackgroundFloating"
        app:scrimAlpha="128"
        app:containerBackgroundColor="?android:colorBackgroundFloating"
        tools:background="?android:colorBackground"
        tools:minHeight="100dp"
        tools:minWidth="100dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
