1<!-- 2 ~ Copyright (C) 2023 The Android Open Source Project 3 ~ 4 ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 ~ you may not use this file except in compliance with the License. 6 ~ You may obtain a copy of the License at 7 ~ 8 ~ http://www.apache.org/licenses/LICENSE-2.0 9 ~ 10 ~ Unless required by applicable law or agreed to in writing, software 11 ~ distributed under the License is distributed on an "AS IS" BASIS, 12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 ~ See the License for the specific language governing permissions and 14 ~ limitations under the License. 15 --> 16 17<!-- Note that this is the layout for landscape phones, the default is in drawable-480dp --> 18<androidx.constraintlayout.widget.ConstraintLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:app="http://schemas.android.com/apk/res-auto" 21 android:layout_width="@dimen/chooser_preview_image_height_tall" 22 android:layout_height="@dimen/chooser_preview_image_height_tall"> 23 24 <com.android.intentresolver.widget.RoundedRectImageView 25 android:id="@+id/image" 26 android:layout_width="match_parent" 27 android:layout_height="match_parent" 28 android:layout_alignParentTop="true" 29 android:adjustViewBounds="false" 30 android:scaleType="centerCrop" 31 app:radius="8dp" /> 32 33 <FrameLayout 34 android:id="@+id/badge_frame" 35 android:layout_width="0dp" 36 android:layout_height="0dp" 37 app:layout_constraintStart_toStartOf="@+id/image" 38 app:layout_constraintEnd_toEndOf="@+id/image" 39 app:layout_constraintTop_toTopOf="@+id/image" 40 app:layout_constraintBottom_toBottomOf="@+id/image" 41 android:background="@drawable/content_preview_badge_bg"> 42 43 <ImageView 44 android:id="@+id/badge" 45 android:layout_width="wrap_content" 46 android:layout_height="wrap_content" 47 android:scaleType="center" 48 android:tint="@android:color/white" 49 android:layout_gravity="center" /> 50 </FrameLayout> 51</androidx.constraintlayout.widget.ConstraintLayout> 52