1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2023 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17<androidx.constraintlayout.widget.ConstraintLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    xmlns:tools="http://schemas.android.com/tools"
21    android:background="@null"
22    android:id="@+id/root"
23    android:layout_width="match_parent"
24    android:layout_height="match_parent">
25
26    <Button
27        android:id="@+id/save"
28        style="@android:style/Widget.DeviceDefault.Button.Colored"
29        android:layout_width="wrap_content"
30        android:layout_height="48dp"
31        android:text="@string/app_clips_save_add_to_note"
32        android:layout_marginStart="8dp"
33        android:background="@drawable/overlay_button_background"
34        android:textColor="?android:textColorSecondary"
35        app:layout_constraintStart_toStartOf="parent"
36        app:layout_constraintTop_toTopOf="parent"
37        app:layout_constraintBottom_toTopOf="@id/preview" />
38
39    <Button
40        android:id="@+id/cancel"
41        style="@android:style/Widget.DeviceDefault.Button.Colored"
42        android:layout_width="wrap_content"
43        android:layout_height="48dp"
44        android:text="@android:string/cancel"
45        android:layout_marginStart="6dp"
46        android:background="@drawable/overlay_button_background"
47        android:textColor="?android:textColorSecondary"
48        app:layout_constraintStart_toEndOf="@id/save"
49        app:layout_constraintTop_toTopOf="parent"
50        app:layout_constraintBottom_toTopOf="@id/preview" />
51
52    <ImageView
53        android:id="@+id/preview"
54        android:layout_width="0px"
55        android:layout_height="0px"
56        android:paddingHorizontal="48dp"
57        android:paddingTop="8dp"
58        android:paddingBottom="42dp"
59        android:contentDescription="@string/screenshot_preview_description"
60        app:layout_constrainedHeight="true"
61        app:layout_constrainedWidth="true"
62        app:layout_constraintTop_toBottomOf="@id/save"
63        app:layout_constraintEnd_toEndOf="parent"
64        app:layout_constraintStart_toStartOf="parent"
65        app:layout_constraintBottom_toBottomOf="parent"
66        tools:background="?android:colorBackground"
67        tools:minHeight="100dp"
68        tools:minWidth="100dp" />
69
70    <com.android.systemui.screenshot.CropView
71        android:id="@+id/crop_view"
72        android:layout_width="0px"
73        android:layout_height="0px"
74        android:paddingTop="8dp"
75        android:paddingBottom="42dp"
76        app:layout_constrainedHeight="true"
77        app:layout_constrainedWidth="true"
78        app:layout_constraintTop_toTopOf="@id/preview"
79        app:layout_constraintEnd_toEndOf="parent"
80        app:layout_constraintStart_toStartOf="parent"
81        app:layout_constraintBottom_toBottomOf="parent"
82        app:handleThickness="@dimen/screenshot_crop_handle_thickness"
83        app:handleColor="?android:attr/colorAccent"
84        app:scrimColor="?android:colorBackgroundFloating"
85        app:scrimAlpha="128"
86        app:containerBackgroundColor="?android:colorBackgroundFloating"
87        tools:background="?android:colorBackground"
88        tools:minHeight="100dp"
89        tools:minWidth="100dp" />
90</androidx.constraintlayout.widget.ConstraintLayout>
91