1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2013 The Android Open Source Project
4
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
18<LinearLayout
19    xmlns:android="http://schemas.android.com/apk/res/android"
20    android:id="@+id/item_root"
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:background="@drawable/list_item_background"
24    android:focusable="true"
25    android:orientation="horizontal" >
26
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            <ImageView
47                android:id="@+id/icon_mime"
48                android:layout_width="wrap_content"
49                android:layout_height="wrap_content"
50                android:layout_gravity="center"
51                android:contentDescription="@null"
52                android:scaleType="centerInside" />
53
54            <ImageView
55                android:id="@+id/icon_thumb"
56                android:layout_width="match_parent"
57                android:layout_height="match_parent"
58                android:contentDescription="@null"
59                android:scaleType="centerCrop" />
60
61            <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" />
70        </FrameLayout>
71
72        <LinearLayout
73            android:layout_width="0dp"
74            android:layout_height="wrap_content"
75            android:layout_weight="1"
76            android:orientation="vertical"
77            android:layout_gravity="center_vertical"
78            android:layout_marginEnd="@dimen/list_item_padding" >
79
80            <LinearLayout
81                android:layout_width="wrap_content"
82                android:layout_height="0dp"
83                android:layout_weight="1">
84
85                <ImageView
86                    android:id="@+id/icon_briefcase"
87                    android:layout_height="@dimen/briefcase_icon_size"
88                    android:layout_width="@dimen/briefcase_icon_size"
89                    android:layout_marginEnd="@dimen/briefcase_icon_margin"
90                    android:layout_gravity="center_vertical"
91                    android:src="@drawable/ic_briefcase"
92                    android:contentDescription="@string/a11y_work"/>
93
94                <TextView
95                    android:id="@android:id/title"
96                    android:layout_width="wrap_content"
97                    android:layout_height="wrap_content"
98                    android:ellipsize="end"
99                    android:singleLine="true"
100                    android:textAlignment="viewStart"
101                    android:textAppearance="?android:attr/textAppearanceListItem"/>
102            </LinearLayout>
103
104            <LinearLayout
105                android:id="@+id/line2"
106                android:layout_width="match_parent"
107                android:layout_height="wrap_content"
108                android:baselineAligned="false"
109                android:gravity="center_vertical"
110                android:orientation="horizontal" >
111
112                <TextView
113                    android:id="@+id/date"
114                    android:layout_width="0dp"
115                    android:layout_height="wrap_content"
116                    android:layout_weight="0.4"
117                    android:ellipsize="end"
118                    android:singleLine="true"
119                    android:textAlignment="viewStart"
120                    android:textAppearance="@style/ItemDocListCaptionText"/>
121
122                <TextView
123                    android:id="@+id/size"
124                    android:layout_width="0dp"
125                    android:layout_height="wrap_content"
126                    android:layout_marginStart="8dp"
127                    android:layout_weight="0.3"
128                    android:ellipsize="end"
129                    android:singleLine="true"
130                    android:textAlignment="viewStart"
131                    android:textAppearance="@style/ItemDocListCaptionText"/>
132
133                <TextView
134                    android:id="@+id/file_type"
135                    android:layout_width="0dp"
136                    android:layout_height="wrap_content"
137                    android:layout_marginStart="8dp"
138                    android:layout_weight="0.3"
139                    android:ellipsize="end"
140                    android:singleLine="true"
141                    android:textAlignment="viewStart"
142                    android:textAppearance="@style/ItemDocListCaptionText"/>
143            </LinearLayout>
144        </LinearLayout>
145
146        <FrameLayout
147            android:id="@+id/preview_icon"
148            android:layout_width="@dimen/list_item_width"
149            android:layout_height="@dimen/list_item_height"
150            android:padding="@dimen/list_item_icon_padding"
151            android:focusable="true"
152            android:clickable="true">
153
154            <ImageView
155                android:layout_width="@dimen/check_icon_size"
156                android:layout_height="@dimen/check_icon_size"
157                android:layout_gravity="center"
158                android:scaleType="fitCenter"
159                android:tint="?android:attr/colorControlNormal"
160                android:src="@drawable/ic_zoom_out"/>
161
162        </FrameLayout>
163
164    </LinearLayout>
165
166</LinearLayout>
167