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:layout_marginStart="8dp"
32        android:background="@drawable/overlay_button_background"
33        android:paddingHorizontal="24dp"
34        android:text="@string/app_clips_save_add_to_note"
35        android:textColor="?android:textColorSecondary"
36        app:layout_constraintBottom_toTopOf="@id/preview"
37        app:layout_constraintStart_toStartOf="parent"
38        app:layout_constraintTop_toTopOf="parent" />
39
40    <Button
41        android:id="@+id/cancel"
42        style="@android:style/Widget.DeviceDefault.Button.Colored"
43        android:layout_width="wrap_content"
44        android:layout_height="48dp"
45        android:layout_marginStart="8dp"
46        android:background="@drawable/overlay_button_background"
47        android:paddingHorizontal="24dp"
48        android:text="@android:string/cancel"
49        android:textColor="?android:textColorSecondary"
50        app:layout_constraintBottom_toTopOf="@id/preview"
51        app:layout_constraintStart_toEndOf="@id/save"
52        app:layout_constraintTop_toTopOf="parent" />
53
54    <ImageView
55        android:id="@+id/preview"
56        android:layout_width="0px"
57        android:layout_height="0px"
58        android:paddingHorizontal="48dp"
59        android:paddingTop="8dp"
60        android:paddingBottom="42dp"
61        android:contentDescription="@string/screenshot_preview_description"
62        app:layout_constrainedHeight="true"
63        app:layout_constrainedWidth="true"
64        app:layout_constraintTop_toBottomOf="@id/save"
65        app:layout_constraintEnd_toEndOf="parent"
66        app:layout_constraintStart_toStartOf="parent"
67        app:layout_constraintBottom_toBottomOf="parent"
68        tools:background="?android:colorBackground"
69        tools:minHeight="100dp"
70        tools:minWidth="100dp" />
71
72    <com.android.systemui.screenshot.scroll.CropView
73        android:id="@+id/crop_view"
74        android:layout_width="0px"
75        android:layout_height="0px"
76        android:paddingTop="8dp"
77        android:paddingBottom="42dp"
78        app:layout_constrainedHeight="true"
79        app:layout_constrainedWidth="true"
80        app:layout_constraintTop_toTopOf="@id/preview"
81        app:layout_constraintEnd_toEndOf="parent"
82        app:layout_constraintStart_toStartOf="parent"
83        app:layout_constraintBottom_toBottomOf="parent"
84        app:handleThickness="@dimen/screenshot_crop_handle_thickness"
85        app:handleColor="?android:attr/colorAccent"
86        app:scrimColor="?android:colorBackgroundFloating"
87        app:scrimAlpha="128"
88        app:containerBackgroundColor="?android:colorBackgroundFloating"
89        tools:background="?android:colorBackground"
90        tools:minHeight="100dp"
91        tools:minWidth="100dp" />
92</androidx.constraintlayout.widget.ConstraintLayout>
93