1<?xml version="1.0" encoding="utf-8"?><!-- 2 Copyright (C) 2013 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:app="http://schemas.android.com/apk/res-auto" 19 android:id="@+id/item_root" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:background="@drawable/list_item_background" 23 android:foreground="?android:attr/selectableItemBackground" 24 android:clickable="true" 25 android:focusable="true" 26 android:orientation="vertical"> 27 28 <LinearLayout 29 android:layout_width="match_parent" 30 android:layout_height="wrap_content" 31 android:baselineAligned="false" 32 android:gravity="center_vertical" 33 android:minHeight="@dimen/list_item_height" 34 android:orientation="horizontal"> 35 36 <FrameLayout 37 android:id="@+id/icon" 38 android:pointerIcon="hand" 39 android:layout_width="@dimen/list_item_width" 40 android:layout_height="@dimen/list_item_height" 41 android:paddingBottom="@dimen/list_item_icon_padding" 42 android:paddingTop="@dimen/list_item_icon_padding" 43 android:paddingEnd="16dp" 44 android:paddingStart="@dimen/list_item_padding"> 45 46 <com.google.android.material.card.MaterialCardView 47 android:layout_width="match_parent" 48 android:layout_height="match_parent" 49 app:cardBackgroundColor="@android:color/transparent" 50 app:cardElevation="0dp"> 51 52 <ImageView 53 android:id="@+id/icon_mime" 54 android:layout_width="wrap_content" 55 android:layout_height="wrap_content" 56 android:layout_gravity="center" 57 android:contentDescription="@null" 58 android:scaleType="centerInside" /> 59 60 <ImageView 61 android:id="@+id/icon_thumb" 62 android:layout_width="match_parent" 63 android:layout_height="match_parent" 64 android:contentDescription="@null" 65 android:scaleType="centerCrop" /> 66 67 <ImageView 68 android:id="@+id/icon_check" 69 android:layout_width="@dimen/check_icon_size" 70 android:layout_height="@dimen/check_icon_size" 71 android:layout_gravity="center" 72 android:alpha="0" 73 android:contentDescription="@null" 74 android:scaleType="fitCenter" 75 android:src="@drawable/ic_check_circle" /> 76 77 </com.google.android.material.card.MaterialCardView> 78 79 </FrameLayout> 80 81 <LinearLayout 82 android:layout_width="0dp" 83 android:layout_height="wrap_content" 84 android:layout_weight="1" 85 android:orientation="vertical" 86 android:layout_gravity="center_vertical" 87 android:layout_marginEnd="@dimen/list_item_padding"> 88 89 <LinearLayout 90 android:layout_width="wrap_content" 91 android:layout_height="0dp" 92 android:layout_weight="1"> 93 94 <ImageView 95 android:id="@+id/icon_profile_badge" 96 android:layout_height="@dimen/briefcase_icon_size" 97 android:layout_width="@dimen/briefcase_icon_size" 98 android:layout_marginEnd="@dimen/briefcase_icon_margin" 99 android:layout_gravity="center_vertical" 100 android:src="@drawable/ic_briefcase" 101 android:tint="?android:attr/colorAccent" 102 android:contentDescription="@string/a11y_work" /> 103 104 <TextView 105 android:id="@android:id/title" 106 android:layout_width="wrap_content" 107 android:layout_height="wrap_content" 108 android:ellipsize="end" 109 android:singleLine="true" 110 android:textAlignment="viewStart" 111 android:textAppearance="?android:attr/textAppearanceListItem" /> 112 113 </LinearLayout> 114 115 <LinearLayout 116 android:id="@+id/line2" 117 android:layout_width="match_parent" 118 android:layout_height="wrap_content" 119 android:baselineAligned="false" 120 android:layout_marginTop="4dp" 121 android:gravity="center_vertical" 122 android:orientation="horizontal"> 123 124 <TextView 125 android:id="@+id/metadata" 126 android:layout_width="wrap_content" 127 android:layout_height="wrap_content" 128 android:ellipsize="end" 129 android:singleLine="true" 130 android:textAppearance="@style/ItemCaptionText" /> 131 132 </LinearLayout> 133 134 </LinearLayout> 135 136 <FrameLayout 137 android:id="@+id/preview_icon" 138 android:layout_width="@dimen/list_item_width" 139 android:layout_height="@dimen/list_item_height" 140 android:padding="@dimen/list_item_icon_padding" 141 android:focusable="true" 142 android:clickable="true"> 143 144 <ImageView 145 android:layout_width="@dimen/check_icon_size" 146 android:layout_height="@dimen/check_icon_size" 147 android:layout_gravity="center" 148 android:scaleType="fitCenter" 149 android:tint="?android:attr/colorControlNormal" 150 android:src="@drawable/ic_zoom_out" /> 151 152 </FrameLayout> 153 154 </LinearLayout> 155 156 <View 157 android:layout_width="match_parent" 158 android:layout_height="1dp" 159 android:layout_marginStart="72dp" 160 android:layout_marginEnd="8dp" 161 android:background="?android:strokeColor" /> 162 163</LinearLayout>