1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3/* 4* Copyright 2019, The Android Open Source Project 5* 6* Licensed under the Apache License, Version 2.0 (the "License"); 7* you may not use this file except in compliance with the License. 8* You may obtain a copy of the License at 9* 10* http://www.apache.org/licenses/LICENSE-2.0 11* 12* Unless required by applicable law or agreed to in writing, software 13* distributed under the License is distributed on an "AS IS" BASIS, 14* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15* See the License for the specific language governing permissions and 16* limitations under the License. 17*/ 18--> 19<!-- Layout Option: Text preview, with optional title and thumbnail --> 20<LinearLayout 21 xmlns:android="http://schemas.android.com/apk/res/android" 22 xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" 23 android:id="@androidprv:id/content_preview_text_area" 24 android:layout_width="match_parent" 25 android:layout_height="wrap_content" 26 android:orientation="vertical" 27 android:background="?android:attr/colorBackground"> 28 29 <RelativeLayout 30 android:layout_width="@dimen/chooser_preview_width" 31 android:layout_height="wrap_content" 32 android:layout_gravity="center" 33 android:orientation="horizontal" 34 android:paddingLeft="@dimen/chooser_edge_margin_normal" 35 android:paddingRight="@dimen/chooser_edge_margin_normal" 36 android:layout_marginBottom="@dimen/chooser_view_spacing" 37 android:id="@androidprv:id/content_preview_text_layout"> 38 39 <TextView 40 android:id="@androidprv:id/content_preview_text" 41 android:layout_width="match_parent" 42 android:layout_height="wrap_content" 43 android:layout_alignParentStart="true" 44 android:layout_centerVertical="true" 45 android:ellipsize="end" 46 android:fontFamily="@androidprv:string/config_headlineFontFamily" 47 android:textColor="?android:attr/textColorPrimary" 48 android:textAlignment="gravity" 49 android:textDirection="locale" 50 android:maxLines="2" 51 android:focusable="true"/> 52 53 </RelativeLayout> 54 55 <TextView 56 android:id="@+id/reselection_action" 57 android:layout_width="match_parent" 58 android:layout_height="wrap_content" 59 android:visibility="gone" 60 android:text="@string/select_text" 61 android:gravity="center" 62 style="@style/ReselectionAction" /> 63 64 <ViewStub 65 android:id="@+id/action_row_stub" 66 android:layout_width="match_parent" 67 android:layout_height="wrap_content" /> 68 69 <!-- Required sub-layout so we can get the nice rounded corners--> 70 <!-- around this section --> 71 <LinearLayout 72 android:layout_width="@dimen/chooser_preview_width" 73 android:layout_height="wrap_content" 74 android:layout_gravity="center" 75 android:orientation="horizontal" 76 android:layout_marginLeft="@dimen/chooser_edge_margin_normal" 77 android:layout_marginRight="@dimen/chooser_edge_margin_normal" 78 android:layout_marginBottom="@dimen/chooser_view_spacing" 79 android:minHeight="80dp" 80 android:background="@androidprv:drawable/chooser_content_preview_rounded" 81 android:id="@androidprv:id/content_preview_title_layout"> 82 83 <com.android.intentresolver.widget.RoundedRectImageView 84 android:id="@androidprv:id/content_preview_thumbnail" 85 android:layout_width="75dp" 86 android:layout_height="75dp" 87 android:layout_marginRight="16dp" 88 android:adjustViewBounds="true" 89 android:layout_gravity="center_vertical" 90 android:gravity="center" 91 android:scaleType="centerCrop"/> 92 93 <TextView 94 android:id="@androidprv:id/content_preview_title" 95 android:layout_width="0dp" 96 android:layout_weight="1" 97 android:layout_height="wrap_content" 98 android:layout_gravity="center_vertical" 99 android:ellipsize="end" 100 android:maxLines="2" 101 android:textAlignment="gravity" 102 android:textDirection="locale" 103 android:textAppearance="@android:style/TextAppearance.DeviceDefault.WindowTitle" 104 android:fontFamily="@androidprv:string/config_headlineFontFamily"/> 105 </LinearLayout> 106</LinearLayout> 107 108