Dispaly thumbnail when file is image
[pub/Android/ownCloud.git] / res / layout / list_item.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ownCloud Android client application
4
5 Copyright (C) 2012 Bartek Przybylski
6 Copyright (C) 2015 ownCloud Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 2,
10 as published by the Free Software Foundation.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 -->
20 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
21 android:id="@+id/ListItemLayout"
22 android:layout_width="match_parent"
23 android:background="@drawable/list_selector"
24 android:orientation="vertical"
25 android:layout_height="56dp">
26
27 <LinearLayout
28 android:layout_width="match_parent"
29 android:layout_height="match_parent"
30 android:orientation="horizontal">
31
32 <FrameLayout
33 android:layout_width="56dp"
34 android:layout_height="56dp"
35 android:focusable="false"
36 android:focusableInTouchMode="false">
37
38 <ImageView
39 android:id="@+id/localFileIndicator"
40 android:layout_width="@dimen/file_icon_size"
41 android:layout_height="@dimen/file_icon_size"
42 android:layout_gravity="center_vertical"
43 android:layout_marginLeft="22dp"
44 android:src="@drawable/local_file_indicator" />
45
46 <ImageView
47 android:id="@+id/thumbnail"
48 android:layout_width="@dimen/file_icon_size"
49 android:layout_height="@dimen/file_icon_size"
50 android:layout_gravity="center_vertical"
51 android:layout_marginLeft="9dp"
52 android:src="@drawable/ic_menu_archive" />
53
54 <ImageView
55 android:id="@+id/favoriteIcon"
56 android:layout_width="wrap_content"
57 android:layout_height="wrap_content"
58 android:layout_gravity="bottom|right"
59 android:layout_marginBottom="10dp"
60 android:layout_marginRight="2dp"
61 android:src="@drawable/ic_favorite" />
62 </FrameLayout>
63
64 <LinearLayout
65 android:layout_width="0dp"
66 android:layout_height="match_parent"
67 android:layout_weight="1"
68 android:gravity="center_vertical"
69 android:orientation="vertical" >
70
71 <TextView
72 android:id="@+id/Filename"
73 android:layout_width="wrap_content"
74 android:layout_height="wrap_content"
75 android:layout_gravity="center_vertical"
76 android:layout_marginLeft="4dp"
77 android:layout_marginRight="4dp"
78 android:ellipsize="middle"
79 android:singleLine="true"
80 android:text="TextView"
81 android:textColor="#303030"
82 android:textSize="16dip" />
83
84 <LinearLayout
85 android:layout_width="match_parent"
86 android:layout_height="wrap_content"
87 android:layout_marginLeft="4dp"
88 android:layout_marginRight="4dp"
89 android:weightSum="1">
90
91 <TextView
92 android:id="@+id/last_mod"
93 android:layout_width="wrap_content"
94 android:layout_height="wrap_content"
95 android:text="TextView"
96 android:layout_weight=".5"
97 android:textColor="@color/list_item_lastmod_and_filesize_text"
98 android:textSize="12dip"/>
99
100 <TextView
101 android:id="@+id/file_size"
102 android:layout_width="wrap_content"
103 android:layout_height="wrap_content"
104 android:gravity="right"
105 android:text="TextView"
106 android:textColor="@color/list_item_lastmod_and_filesize_text"
107 android:layout_weight=".5"
108 android:textSize="12dip"/>
109
110 </LinearLayout>
111
112 </LinearLayout>
113
114 <LinearLayout
115 android:layout_width="25dp"
116 android:layout_height="match_parent"
117 android:gravity="center_vertical"
118 android:orientation="vertical">
119
120 <ImageView
121 android:id="@+id/sharedIcon"
122 android:layout_width="wrap_content"
123 android:layout_height="wrap_content"
124 android:layout_gravity="center"
125 android:layout_marginLeft="4dp"
126 android:layout_marginBottom="4dp"
127 android:layout_marginRight="4dp"
128 android:src="@drawable/sharedlink" />
129
130 <ImageView
131 android:id="@+id/sharedWithMeIcon"
132 android:layout_width="wrap_content"
133 android:layout_height="wrap_content"
134 android:layout_gravity="center"
135 android:layout_marginLeft="4dp"
136 android:layout_marginRight="4dp"
137 android:layout_marginTop="4dp"
138 android:src="@drawable/shared_with_me"
139 android:visibility="invisible" />
140
141 </LinearLayout>
142
143 <ImageView
144 android:id="@+id/custom_checkbox"
145 android:layout_width="wrap_content"
146 android:layout_height="wrap_content"
147 android:layout_gravity="center_vertical"
148 android:layout_marginLeft="4dp"
149 android:layout_marginRight="4dp"
150 android:gravity=""
151 android:src="@android:drawable/checkbox_off_background" />
152 </LinearLayout>
153
154 <View
155 android:layout_width="match_parent"
156 android:layout_height="1dp"
157 android:background="@color/list_divider_background"></View>
158
159 </LinearLayout>