blob: 29f65e09f18455816e496235953911a031a6057f [file] [log] [blame]
Jeff Sharkey54e55b72013-06-30 20:02:59 -07001<?xml version="1.0" encoding="utf-8"?>
Ben Kwaddc3d212016-01-07 18:50:34 -08002<!--
3 Copyright (C) 2013 The Android Open Source Project
Jeff Sharkey54e55b72013-06-30 20:02:59 -07004
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
Ben Kwad7915d22015-10-26 11:54:41 -070018<com.android.documentsui.ListItem xmlns:android="http://schemas.android.com/apk/res/android"
Jeff Sharkey54e55b72013-06-30 20:02:59 -070019 android:layout_width="match_parent"
20 android:layout_height="wrap_content"
Ben Kwad27906e2015-11-10 21:02:47 -080021 android:background="@color/item_doc_background"
Ben Kwaddc3d212016-01-07 18:50:34 -080022 android:focusable="true"
23 android:orientation="horizontal" >
Ben Kwad27906e2015-11-10 21:02:47 -080024
Ben Kwabd964562015-10-14 08:00:27 -070025 <View
26 android:id="@+id/focus_indicator"
27 android:layout_width="4dp"
28 android:layout_height="match_parent" />
Jeff Sharkey54e55b72013-06-30 20:02:59 -070029
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -070030 <LinearLayout
Jeff Sharkey69631482014-07-27 21:01:45 -070031 android:layout_width="match_parent"
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -070032 android:layout_height="wrap_content"
Ben Kwaddc3d212016-01-07 18:50:34 -080033 android:baselineAligned="false"
Jeff Sharkey69631482014-07-27 21:01:45 -070034 android:gravity="center_vertical"
Ben Kwaddc3d212016-01-07 18:50:34 -080035 android:minHeight="@dimen/list_item_height"
Jeff Sharkey69631482014-07-27 21:01:45 -070036 android:orientation="horizontal"
Ben Kwaddc3d212016-01-07 18:50:34 -080037 android:paddingEnd="@dimen/list_item_padding"
38 android:paddingStart="@dimen/list_item_padding" >
Jeff Sharkey54e55b72013-06-30 20:02:59 -070039
Jeff Sharkey69631482014-07-27 21:01:45 -070040 <FrameLayout
41 android:id="@android:id/icon"
Ben Kwaddc3d212016-01-07 18:50:34 -080042 android:layout_width="@dimen/list_item_thumbnail_size"
43 android:layout_height="@dimen/list_item_thumbnail_size"
44 android:layout_marginEnd="16dp" >
Jeff Sharkey28c05ee2013-09-06 13:22:09 -070045
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -070046 <ImageView
Jeff Sharkey69631482014-07-27 21:01:45 -070047 android:id="@+id/icon_mime"
48 android:layout_width="wrap_content"
Ben Kwaddc3d212016-01-07 18:50:34 -080049 android:layout_height="wrap_content"
50 android:layout_gravity="center"
51 android:contentDescription="@null"
52 android:scaleType="centerInside" />
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -070053
Jeff Sharkey69631482014-07-27 21:01:45 -070054 <ImageView
55 android:id="@+id/icon_thumb"
56 android:layout_width="match_parent"
57 android:layout_height="match_parent"
Ben Kwaddc3d212016-01-07 18:50:34 -080058 android:contentDescription="@null"
59 android:scaleType="centerCrop" />
Jeff Sharkey69631482014-07-27 21:01:45 -070060
Ben Kwaddc3d212016-01-07 18:50:34 -080061 <ImageView
62 android:id="@+id/icon_check"
63 android:layout_width="@dimen/check_icon_size"
64 android:layout_height="@dimen/check_icon_size"
65 android:layout_gravity="center"
66 android:alpha="0"
67 android:contentDescription="@null"
68 android:scaleType="fitCenter"
69 android:src="@drawable/ic_check_circle" />
Jeff Sharkey69631482014-07-27 21:01:45 -070070 </FrameLayout>
Jeff Sharkey28c05ee2013-09-06 13:22:09 -070071
72 <LinearLayout
Jeff Sharkey69631482014-07-27 21:01:45 -070073 android:layout_width="0dp"
Jeff Sharkey28c05ee2013-09-06 13:22:09 -070074 android:layout_height="wrap_content"
Jeff Sharkey69631482014-07-27 21:01:45 -070075 android:layout_weight="1"
Steve McKay8b8a6fd2016-03-01 11:26:00 -080076 android:orientation="vertical"
77 android:layout_gravity="center_vertical" >
Jeff Sharkey28c05ee2013-09-06 13:22:09 -070078
Ben Kwaddc3d212016-01-07 18:50:34 -080079 <TextView
80 android:id="@android:id/title"
81 android:layout_width="wrap_content"
82 android:layout_height="0dp"
83 android:layout_weight="1"
Steve McKayda48a9a2016-02-24 12:57:06 -080084 android:ellipsize="end"
Ben Kwaddc3d212016-01-07 18:50:34 -080085 android:singleLine="true"
86 android:textAlignment="viewStart"
87 android:textAppearance="@android:style/TextAppearance.Material.Subhead"
88 android:textColor="?android:attr/textColorPrimary" />
Jeff Sharkey69631482014-07-27 21:01:45 -070089
90 <LinearLayout
91 android:id="@+id/line2"
92 android:layout_width="match_parent"
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -070093 android:layout_height="wrap_content"
Ben Kwaddc3d212016-01-07 18:50:34 -080094 android:baselineAligned="false"
Jeff Sharkey69631482014-07-27 21:01:45 -070095 android:gravity="center_vertical"
Ben Kwaddc3d212016-01-07 18:50:34 -080096 android:orientation="horizontal" >
Jeff Sharkey69631482014-07-27 21:01:45 -070097
98 <TextView
99 android:id="@+id/date"
100 android:layout_width="90dp"
101 android:layout_height="wrap_content"
Jeff Sharkey69631482014-07-27 21:01:45 -0700102 android:ellipsize="end"
Ben Kwaddc3d212016-01-07 18:50:34 -0800103 android:singleLine="true"
Jeff Sharkey69631482014-07-27 21:01:45 -0700104 android:textAlignment="viewStart"
105 android:textAppearance="@android:style/TextAppearance.Material.Body1"
106 android:textColor="?android:attr/textColorSecondary" />
107
108 <TextView
109 android:id="@+id/size"
110 android:layout_width="90dp"
111 android:layout_height="wrap_content"
112 android:layout_marginStart="8dp"
Jeff Sharkey69631482014-07-27 21:01:45 -0700113 android:ellipsize="end"
Ben Kwaddc3d212016-01-07 18:50:34 -0800114 android:singleLine="true"
Jeff Sharkey69631482014-07-27 21:01:45 -0700115 android:textAlignment="viewStart"
116 android:textAppearance="@android:style/TextAppearance.Material.Body1"
117 android:textColor="?android:attr/textColorSecondary" />
118
119 <TextView
120 android:id="@android:id/summary"
121 android:layout_width="0dp"
122 android:layout_height="wrap_content"
Jeff Sharkey69631482014-07-27 21:01:45 -0700123 android:layout_marginStart="8dp"
Ben Kwaddc3d212016-01-07 18:50:34 -0800124 android:layout_weight="1"
Jeff Sharkey69631482014-07-27 21:01:45 -0700125 android:ellipsize="end"
Ben Kwaddc3d212016-01-07 18:50:34 -0800126 android:singleLine="true"
Jeff Sharkey69631482014-07-27 21:01:45 -0700127 android:textAlignment="viewStart"
128 android:textAppearance="@android:style/TextAppearance.Material.Body1"
129 android:textColor="?android:attr/textColorSecondary" />
Jeff Sharkey69631482014-07-27 21:01:45 -0700130 </LinearLayout>
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -0700131 </LinearLayout>
Jeff Sharkeyb156f4b2013-08-06 16:26:14 -0700132 </LinearLayout>
133
Ben Kwad7915d22015-10-26 11:54:41 -0700134</com.android.documentsui.ListItem>