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 18<androidx.constraintlayout.widget.ConstraintLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" 21 xmlns:app="http://schemas.android.com/apk/res-auto" 22 android:layout_width="match_parent" 23 android:layout_height="wrap_content" 24 android:paddingHorizontal="@dimen/chooser_edge_margin_normal" 25 android:layout_marginBottom="@dimen/chooser_view_spacing" 26> 27 <TextView 28 android:id="@+id/headline" 29 android:layout_width="wrap_content" 30 android:layout_height="wrap_content" 31 android:visibility="invisible" 32 app:layout_constraintStart_toStartOf="parent" 33 app:layout_constraintEnd_toStartOf="@id/barrier" 34 app:layout_constraintHorizontal_bias="0.0" 35 app:layout_constrainedWidth="true" 36 style="@style/TextAppearance.ChooserDefault" 37 android:fontFamily="@androidprv:string/config_headlineFontFamily" 38 android:textSize="@dimen/chooser_headline_text_size" 39 /> 40 41 <TextView 42 android:id="@+id/metadata" 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:visibility="gone" 46 app:layout_constraintStart_toStartOf="parent" 47 app:layout_constraintEnd_toStartOf="@id/barrier" 48 app:layout_constraintHorizontal_bias="0.0" 49 app:layout_constrainedWidth="true" 50 app:layout_constraintTop_toBottomOf="@id/headline" 51 style="@style/TextAppearance.ChooserDefault" 52 android:fontFamily="@androidprv:string/config_bodyFontFamily" 53 android:textSize="12sp" 54 /> 55 56 <androidx.constraintlayout.widget.Barrier 57 android:id="@+id/barrier" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 app:barrierDirection="start" 61 app:constraint_referenced_ids="reselection_action,include_text_action" /> 62 63 <Button 64 android:id="@+id/reselection_action" 65 android:layout_width="wrap_content" 66 android:layout_height="wrap_content" 67 android:maxWidth="@dimen/modify_share_text_toggle_max_width" 68 android:background="@drawable/chooser_action_button_bg" 69 app:layout_constraintEnd_toEndOf="parent" 70 android:maxLines="2" 71 android:ellipsize="end" 72 android:visibility="gone" 73 android:paddingVertical="3dp" 74 android:paddingHorizontal="@dimen/chooser_edge_margin_normal_half" 75 style="?android:attr/borderlessButtonStyle" 76 android:drawableEnd="@drawable/chevron_right" 77 android:textColor="@androidprv:color/materialColorOnSurface" 78 android:textSize="12sp" 79 /> 80 81 <!-- This is only relevant for image+text preview, but needs to be in this layout so it can 82 stay at the top if there's no reselection action. --> 83 <CheckBox 84 android:id="@+id/include_text_action" 85 android:layout_width="wrap_content" 86 android:layout_height="wrap_content" 87 android:maxWidth="@dimen/modify_share_text_toggle_max_width" 88 android:layout_marginTop="16dp" 89 app:layout_goneMarginTop="0dp" 90 app:layout_constraintEnd_toEndOf="parent" 91 app:layout_constraintTop_toBottomOf="@id/reselection_action" 92 android:layout_alignWithParentIfMissing="true" 93 android:textColor="@androidprv:color/materialColorOnSurface" 94 android:visibility="gone" /> 95 96</androidx.constraintlayout.widget.ConstraintLayout> 97