1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2020 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<com.android.systemui.screenshot.DraggableConstraintLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 android:layout_width="match_parent" 22 android:layout_height="match_parent"> 23 <ImageView 24 android:id="@+id/actions_container_background" 25 android:visibility="gone" 26 android:layout_height="0dp" 27 android:layout_width="0dp" 28 android:elevation="4dp" 29 android:background="@drawable/action_chip_container_background" 30 android:layout_marginStart="@dimen/overlay_action_container_margin_horizontal" 31 android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom" 32 app:layout_constraintStart_toStartOf="parent" 33 app:layout_constraintTop_toTopOf="@+id/actions_container" 34 app:layout_constraintEnd_toEndOf="@+id/actions_container" 35 app:layout_constraintBottom_toTopOf="@id/guideline"/> 36 <HorizontalScrollView 37 android:id="@+id/actions_container" 38 android:layout_width="0dp" 39 android:layout_height="wrap_content" 40 android:layout_marginEnd="@dimen/overlay_action_container_margin_horizontal" 41 android:paddingEnd="@dimen/overlay_action_container_padding_end" 42 android:paddingVertical="@dimen/overlay_action_container_padding_vertical" 43 android:elevation="4dp" 44 android:scrollbars="none" 45 app:layout_constraintHorizontal_bias="0" 46 app:layout_constraintWidth_percent="1.0" 47 app:layout_constraintWidth_max="wrap" 48 app:layout_constraintStart_toEndOf="@+id/screenshot_preview_border" 49 app:layout_constraintEnd_toEndOf="parent" 50 app:layout_constraintBottom_toBottomOf="@id/actions_container_background"> 51 <LinearLayout 52 android:id="@+id/screenshot_actions" 53 android:layout_width="wrap_content" 54 android:layout_height="wrap_content"> 55 <include layout="@layout/overlay_action_chip" 56 android:id="@+id/screenshot_share_chip"/> 57 <include layout="@layout/overlay_action_chip" 58 android:id="@+id/screenshot_edit_chip"/> 59 <include layout="@layout/overlay_action_chip" 60 android:id="@+id/screenshot_scroll_chip" 61 android:visibility="gone" /> 62 </LinearLayout> 63 </HorizontalScrollView> 64 <View 65 android:id="@+id/screenshot_preview_border" 66 android:layout_width="0dp" 67 android:layout_height="0dp" 68 android:layout_marginStart="@dimen/overlay_preview_container_margin" 69 android:layout_marginTop="@dimen/overlay_border_width_neg" 70 android:layout_marginEnd="@dimen/overlay_border_width_neg" 71 android:layout_marginBottom="@dimen/overlay_preview_container_margin" 72 android:elevation="8dp" 73 android:alpha="0" 74 android:background="@drawable/overlay_border" 75 app:layout_constraintStart_toStartOf="@id/actions_container_background" 76 app:layout_constraintTop_toTopOf="@id/screenshot_preview" 77 app:layout_constraintEnd_toEndOf="@id/screenshot_preview" 78 app:layout_constraintBottom_toBottomOf="@id/actions_container_background"/> 79 <ImageView 80 android:id="@+id/screenshot_preview" 81 android:visibility="invisible" 82 android:layout_width="@dimen/overlay_x_scale" 83 android:layout_height="wrap_content" 84 android:layout_marginStart="@dimen/overlay_border_width" 85 android:layout_marginBottom="@dimen/overlay_border_width" 86 android:layout_gravity="center" 87 android:elevation="8dp" 88 android:contentDescription="@string/screenshot_edit_description" 89 android:scaleType="fitEnd" 90 android:background="@drawable/overlay_preview_background" 91 android:adjustViewBounds="true" 92 android:clickable="true" 93 app:layout_constraintStart_toStartOf="@id/screenshot_preview_border" 94 app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border"/> 95 <ImageView 96 android:id="@+id/screenshot_badge" 97 android:layout_width="56dp" 98 android:layout_height="56dp" 99 android:visibility="gone" 100 android:elevation="9dp" 101 app:layout_constraintBottom_toBottomOf="@id/screenshot_preview_border" 102 app:layout_constraintEnd_toEndOf="@id/screenshot_preview_border"/> 103 <FrameLayout 104 android:id="@+id/screenshot_dismiss_button" 105 android:layout_width="@dimen/overlay_dismiss_button_tappable_size" 106 android:layout_height="@dimen/overlay_dismiss_button_tappable_size" 107 android:elevation="11dp" 108 android:visibility="gone" 109 app:layout_constraintStart_toEndOf="@id/screenshot_preview" 110 app:layout_constraintEnd_toEndOf="@id/screenshot_preview" 111 app:layout_constraintTop_toTopOf="@id/screenshot_preview" 112 app:layout_constraintBottom_toTopOf="@id/screenshot_preview" 113 android:contentDescription="@string/screenshot_dismiss_description"> 114 <ImageView 115 android:id="@+id/screenshot_dismiss_image" 116 android:layout_width="match_parent" 117 android:layout_height="match_parent" 118 android:layout_margin="@dimen/overlay_dismiss_button_margin" 119 android:background="@drawable/circular_background" 120 android:backgroundTint="?androidprv:attr/materialColorPrimary" 121 android:tint="?androidprv:attr/materialColorOnPrimary" 122 android:padding="4dp" 123 android:src="@drawable/ic_close"/> 124 </FrameLayout> 125 <ImageView 126 android:id="@+id/screenshot_scrollable_preview" 127 android:layout_width="wrap_content" 128 android:layout_height="wrap_content" 129 android:scaleType="matrix" 130 android:visibility="gone" 131 app:layout_constraintStart_toStartOf="@id/screenshot_preview" 132 app:layout_constraintTop_toTopOf="@id/screenshot_preview" 133 android:elevation="7dp"/> 134 135 <androidx.constraintlayout.widget.Guideline 136 android:id="@+id/guideline" 137 android:layout_width="wrap_content" 138 android:layout_height="wrap_content" 139 android:orientation="horizontal" 140 app:layout_constraintGuide_end="0dp" /> 141 142 <FrameLayout 143 android:id="@+id/screenshot_message_container" 144 android:layout_width="0dp" 145 android:layout_height="wrap_content" 146 android:layout_marginHorizontal="@dimen/overlay_action_container_margin_horizontal" 147 android:layout_marginTop="4dp" 148 android:layout_marginBottom="@dimen/overlay_action_container_margin_bottom" 149 android:paddingHorizontal="@dimen/overlay_action_container_padding_end" 150 android:paddingVertical="@dimen/overlay_action_container_padding_vertical" 151 android:elevation="4dp" 152 android:background="@drawable/action_chip_container_background" 153 android:visibility="gone" 154 app:layout_constraintTop_toBottomOf="@id/guideline" 155 app:layout_constraintStart_toStartOf="parent" 156 app:layout_constraintEnd_toEndOf="parent" 157 app:layout_constraintWidth_max="450dp" 158 app:layout_constraintHorizontal_bias="0"> 159 <include layout="@layout/screenshot_work_profile_first_run" /> 160 <include layout="@layout/screenshot_detection_notice" /> 161 </FrameLayout> 162</com.android.systemui.screenshot.DraggableConstraintLayout> 163