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_briefcase" 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:contentDescription="@string/a11y_work" /> 102 103 <TextView 104 android:id="@android:id/title" 105 android:layout_width="wrap_content" 106 android:layout_height="wrap_content" 107 android:ellipsize="end" 108 android:singleLine="true" 109 android:textAlignment="viewStart" 110 android:textAppearance="?android:attr/textAppearanceListItem" /> 111 112 </LinearLayout> 113 114 <LinearLayout 115 android:id="@+id/line2" 116 android:layout_width="match_parent" 117 android:layout_height="wrap_content" 118 android:baselineAligned="false" 119 android:layout_marginTop="4dp" 120 android:gravity="center_vertical" 121 android:orientation="horizontal"> 122 123 <TextView 124 android:id="@+id/metadata" 125 android:layout_width="wrap_content" 126 android:layout_height="wrap_content" 127 android:ellipsize="end" 128 android:singleLine="true" 129 android:textAppearance="@style/ItemCaptionText" /> 130 131 </LinearLayout> 132 133 </LinearLayout> 134 135 <FrameLayout 136 android:id="@+id/preview_icon" 137 android:layout_width="@dimen/list_item_width" 138 android:layout_height="@dimen/list_item_height" 139 android:padding="@dimen/list_item_icon_padding" 140 android:focusable="true" 141 android:clickable="true"> 142 143 <ImageView 144 android:layout_width="@dimen/check_icon_size" 145 android:layout_height="@dimen/check_icon_size" 146 android:layout_gravity="center" 147 android:scaleType="fitCenter" 148 android:tint="?android:attr/colorControlNormal" 149 android:src="@drawable/ic_zoom_out" /> 150 151 </FrameLayout> 152 153 </LinearLayout> 154 155 <View 156 android:layout_width="match_parent" 157 android:layout_height="1dp" 158 android:layout_marginStart="72dp" 159 android:layout_marginEnd="8dp" 160 android:background="?android:strokeColor" /> 161 162</LinearLayout>