• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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="@android: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            <TextView
81                android:id="@android:id/title"
82                android:layout_width="wrap_content"
83                android:layout_height="0dp"
84                android:layout_weight="1"
85                android:ellipsize="end"
86                android:singleLine="true"
87                android:textAlignment="viewStart"
88                android:textAppearance="?android:attr/textAppearanceListItem" />
89
90            <LinearLayout
91                android:id="@+id/line2"
92                android:layout_width="match_parent"
93                android:layout_height="wrap_content"
94                android:baselineAligned="false"
95                android:gravity="center_vertical"
96                android:orientation="horizontal" >
97
98                <TextView
99                    android:id="@+id/date"
100                    android:layout_width="0dp"
101                    android:layout_height="wrap_content"
102                    android:layout_weight="0.4"
103                    android:ellipsize="end"
104                    android:singleLine="true"
105                    android:textAlignment="viewStart"
106                    android:textAppearance="@android:style/TextAppearance.Material.Caption"/>
107
108                <TextView
109                    android:id="@+id/size"
110                    android:layout_width="0dp"
111                    android:layout_height="wrap_content"
112                    android:layout_marginStart="8dp"
113                    android:layout_weight="0.3"
114                    android:ellipsize="end"
115                    android:singleLine="true"
116                    android:textAlignment="viewStart"
117                    android:textAppearance="@android:style/TextAppearance.Material.Caption"/>
118
119                <TextView
120                    android:id="@+id/file_type"
121                    android:layout_width="0dp"
122                    android:layout_height="wrap_content"
123                    android:layout_marginStart="8dp"
124                    android:layout_weight="0.3"
125                    android:ellipsize="end"
126                    android:singleLine="true"
127                    android:textAlignment="viewStart"
128                    android:textAppearance="@android:style/TextAppearance.Material.Caption"/>
129            </LinearLayout>
130        </LinearLayout>
131
132        <FrameLayout
133            android:id="@+id/preview_icon"
134            android:layout_width="@dimen/list_item_width"
135            android:layout_height="@dimen/list_item_height"
136            android:padding="@dimen/list_item_icon_padding"
137            android:focusable="true"
138            android:clickable="true">
139
140            <ImageView
141                android:layout_width="@dimen/check_icon_size"
142                android:layout_height="@dimen/check_icon_size"
143                android:layout_gravity="center"
144                android:scaleType="fitCenter"
145                android:tint="?android:attr/colorControlNormal"
146                android:src="@drawable/ic_zoom_out"/>
147
148        </FrameLayout>
149
150    </LinearLayout>
151
152</LinearLayout>
153