Aligns with clipboard UI; also makes screenshot UI more lightweight. Bug: 231122823 Fix: 231122823 Test: manual (UI change only) Change-Id: I344ebf5d1f8e8862bcbb8976b309d6cf7f3c19af
136 lines
6.5 KiB
XML
136 lines
6.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
~ Copyright (C) 2020 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.
|
|
-->
|
|
<com.android.systemui.screenshot.DraggableConstraintLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
<ImageView
|
|
android:id="@+id/actions_container_background"
|
|
android:visibility="gone"
|
|
android:layout_height="0dp"
|
|
android:layout_width="0dp"
|
|
android:elevation="4dp"
|
|
android:background="@drawable/action_chip_container_background"
|
|
android:layout_marginStart="@dimen/overlay_action_container_margin_horizontal"
|
|
app:layout_constraintBottom_toBottomOf="@+id/actions_container"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="@+id/actions_container"
|
|
app:layout_constraintEnd_toEndOf="@+id/actions_container"/>
|
|
<HorizontalScrollView
|
|
android:id="@+id/actions_container"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="@dimen/overlay_action_container_margin_horizontal"
|
|
android:layout_marginBottom="4dp"
|
|
android:paddingEnd="@dimen/overlay_action_container_padding_right"
|
|
android:paddingVertical="@dimen/overlay_action_container_padding_vertical"
|
|
android:elevation="4dp"
|
|
android:scrollbars="none"
|
|
app:layout_constraintHorizontal_bias="0"
|
|
app:layout_constraintWidth_percent="1.0"
|
|
app:layout_constraintWidth_max="wrap"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/screenshot_preview_border"
|
|
app:layout_constraintEnd_toEndOf="parent">
|
|
<LinearLayout
|
|
android:id="@+id/screenshot_actions"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content">
|
|
<include layout="@layout/overlay_action_chip"
|
|
android:id="@+id/screenshot_share_chip"/>
|
|
<include layout="@layout/overlay_action_chip"
|
|
android:id="@+id/screenshot_edit_chip"/>
|
|
<include layout="@layout/overlay_action_chip"
|
|
android:id="@+id/screenshot_scroll_chip"
|
|
android:visibility="gone" />
|
|
</LinearLayout>
|
|
</HorizontalScrollView>
|
|
<View
|
|
android:id="@+id/screenshot_preview_border"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_marginStart="@dimen/overlay_offset_x"
|
|
android:layout_marginBottom="12dp"
|
|
android:elevation="7dp"
|
|
android:alpha="0"
|
|
android:background="@drawable/overlay_border"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="@id/screenshot_preview_end"
|
|
app:layout_constraintTop_toTopOf="@id/screenshot_preview_top"/>
|
|
<androidx.constraintlayout.widget.Barrier
|
|
android:id="@+id/screenshot_preview_end"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:barrierMargin="@dimen/overlay_border_width"
|
|
app:barrierDirection="end"
|
|
app:constraint_referenced_ids="screenshot_preview"/>
|
|
<androidx.constraintlayout.widget.Barrier
|
|
android:id="@+id/screenshot_preview_top"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:barrierDirection="top"
|
|
app:barrierMargin="@dimen/overlay_border_width_neg"
|
|
app:constraint_referenced_ids="screenshot_preview"/>
|
|
<ImageView
|
|
android:id="@+id/screenshot_preview"
|
|
android:visibility="invisible"
|
|
android:layout_width="@dimen/overlay_x_scale"
|
|
android:layout_margin="@dimen/overlay_border_width"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:elevation="7dp"
|
|
android:contentDescription="@string/screenshot_edit_description"
|
|
android:scaleType="fitEnd"
|
|
android:background="@drawable/overlay_preview_background"
|
|
android:adjustViewBounds="true"
|
|
android:clickable="true"
|
|
app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"
|
|
app:layout_constraintStart_toStartOf="@id/screenshot_preview_border"
|
|
app:layout_constraintEnd_toEndOf="@id/screenshot_preview_border"
|
|
app:layout_constraintTop_toTopOf="@id/screenshot_preview_border">
|
|
</ImageView>
|
|
<FrameLayout
|
|
android:id="@+id/screenshot_dismiss_button"
|
|
android:layout_width="@dimen/overlay_dismiss_button_tappable_size"
|
|
android:layout_height="@dimen/overlay_dismiss_button_tappable_size"
|
|
android:elevation="10dp"
|
|
android:visibility="gone"
|
|
app:layout_constraintStart_toEndOf="@id/screenshot_preview"
|
|
app:layout_constraintEnd_toEndOf="@id/screenshot_preview"
|
|
app:layout_constraintTop_toTopOf="@id/screenshot_preview"
|
|
app:layout_constraintBottom_toTopOf="@id/screenshot_preview"
|
|
android:contentDescription="@string/screenshot_dismiss_description">
|
|
<ImageView
|
|
android:id="@+id/screenshot_dismiss_image"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_margin="@dimen/overlay_dismiss_button_margin"
|
|
android:src="@drawable/overlay_cancel"/>
|
|
</FrameLayout>
|
|
<ImageView
|
|
android:id="@+id/screenshot_scrollable_preview"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:scaleType="matrix"
|
|
android:visibility="gone"
|
|
app:layout_constraintStart_toStartOf="@id/screenshot_preview"
|
|
app:layout_constraintTop_toTopOf="@id/screenshot_preview"
|
|
android:elevation="7dp"/>
|
|
</com.android.systemui.screenshot.DraggableConstraintLayout>
|