| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2021 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:androidprv="http://schemas.android.com/apk/prv/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| xmlns:tools="http://schemas.android.com/tools" |
| 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:text="@string/save" |
| android:layout_marginStart="8dp" |
| android:layout_marginTop="@dimen/long_screenshot_action_bar_top_margin" |
| android:background="@drawable/overlay_button_background" |
| android:backgroundTint="?androidprv:attr/materialColorPrimary" |
| android:textColor="?androidprv:attr/materialColorOnPrimary" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintTop_toTopOf="parent" |
| app:layout_constraintBottom_toTopOf="@id/preview" /> |
| |
| <Button |
| android:id="@+id/cancel" |
| style="@android:style/Widget.DeviceDefault.Button.Colored" |
| android:layout_width="wrap_content" |
| android:layout_height="48dp" |
| android:text="@android:string/cancel" |
| android:layout_marginStart="6dp" |
| android:layout_marginTop="@dimen/long_screenshot_action_bar_top_margin" |
| android:background="@drawable/overlay_button_outline" |
| android:backgroundTint="?androidprv:attr/materialColorPrimary" |
| android:textColor="?androidprv:attr/materialColorOnSurface" |
| app:layout_constraintStart_toEndOf="@id/save" |
| app:layout_constraintTop_toTopOf="parent" |
| app:layout_constraintBottom_toTopOf="@id/preview" |
| /> |
| |
| <ImageButton |
| android:id="@+id/share" |
| style="@android:style/Widget.Material.Button.Borderless" |
| android:tint="?androidprv:attr/materialColorOnSurface" |
| android:layout_width="48dp" |
| android:layout_height="48dp" |
| android:layout_marginEnd="8dp" |
| android:layout_marginTop="@dimen/long_screenshot_action_bar_top_margin" |
| android:padding="12dp" |
| android:src="@drawable/ic_screenshot_share" |
| android:scaleType="fitCenter" |
| android:contentDescription="@*android:string/share" |
| android:tooltipText="@*android:string/share" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintTop_toTopOf="parent" |
| app:layout_constraintBottom_toTopOf="@id/preview" /> |
| |
| <ImageView |
| android:id="@+id/preview" |
| android:layout_width="0px" |
| android:layout_height="0px" |
| android:paddingHorizontal="48dp" |
| android:paddingTop="8dp" |
| android:paddingBottom="42dp" |
| android:alpha="0" |
| 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" /> |
| |
| <ImageView |
| android:id="@+id/enter_transition" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:scaleType="matrix" |
| android:visibility="invisible" |
| app:layout_constraintTop_toTopOf="@id/preview" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintStart_toStartOf="parent" |
| android:transitionName="screenshot_preview_image"/> |
| |
| <com.android.systemui.screenshot.CropView |
| android:id="@+id/crop_view" |
| android:layout_width="0px" |
| android:layout_height="0px" |
| android:paddingTop="8dp" |
| android:paddingBottom="42dp" |
| android:visibility="gone" |
| 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="?androidprv:attr/materialColorSecondary" |
| app:scrimColor="?androidprv:attr/materialColorSurfaceContainer" |
| app:scrimAlpha="128" |
| app:containerBackgroundColor="?androidprv:attr/materialColorSurfaceContainer" |
| tools:background="?android:colorBackground" |
| tools:minHeight="100dp" |
| tools:minWidth="100dp" /> |
| |
| <com.android.systemui.screenshot.MagnifierView |
| android:id="@+id/magnifier" |
| android:visibility="invisible" |
| android:layout_width="200dp" |
| android:layout_height="200dp" |
| android:elevation="2dp" |
| app:layout_constraintTop_toTopOf="@id/preview" |
| app:layout_constraintLeft_toLeftOf="parent" |
| app:handleThickness="@dimen/screenshot_crop_handle_thickness" |
| app:handleColor="?androidprv:attr/materialColorSecondary" |
| app:scrimColor="?androidprv:attr/materialColorSurfaceContainer" |
| app:scrimAlpha="128" |
| app:borderThickness="4dp" |
| app:borderColor="?androidprv:attr/materialColorSurfaceBright" /> |
| |
| <ImageButton |
| android:id="@+id/edit" |
| android:layout_width="56dp" |
| android:layout_height="56dp" |
| android:layout_marginBottom="16dp" |
| android:layout_marginEnd="16dp" |
| style="@android:style/Widget.DeviceDefault.Button.Colored" |
| android:background="@drawable/screenshot_edit_background" |
| android:src="@drawable/ic_screenshot_edit" |
| android:contentDescription="@string/screenshot_edit_label" |
| android:tint="?androidprv:attr/materialColorOnSecondaryFixed" |
| android:padding="16dp" |
| android:scaleType="fitCenter" |
| app:layout_constraintBottom_toBottomOf="parent" |
| app:layout_constraintEnd_toEndOf="parent"/> |
| |
| <ImageView |
| android:id="@+id/transition" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| app:layout_constraintTop_toTopOf="@id/preview" |
| app:layout_constraintLeft_toLeftOf="parent" |
| android:scaleType="centerCrop" |
| android:visibility="invisible" /> |
| |
| </androidx.constraintlayout.widget.ConstraintLayout> |