Fix crash in navigation in FileList
[pub/Android/ownCloud.git] / res / layout / grid_item.xml
index 5c35c62..d0f3d0f 100644 (file)
@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <!--\r
   ownCloud Android client application\r
-\r
-  Copyright (C) 2012  Bartek Przybylski\r
-  Copyright (C) 2012-2013 ownCloud Inc.\r
+  Copyright (C) 2015 ownCloud Inc.\r
 \r
   This program is free software: you can redistribute it and/or modify\r
   it under the terms of the GNU General Public License version 2,\r
   along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
   \r
 -->\r
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
+<com.owncloud.android.ui.SquareLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"\r
     android:id="@+id/ListItemLayout"\r
-    android:layout_width="fill_parent"\r
-    android:layout_height="160dp"\r
+    android:layout_width="match_parent"\r
+    android:layout_height="match_parent"\r
+    android:layout_gravity="center_horizontal"\r
     android:background="@drawable/list_selector"\r
+    android:gravity="center"\r
     android:orientation="vertical" >\r
 \r
-    <ImageView\r
-        android:id="@+id/imageView1"\r
-        android:layout_width="90dp"\r
-        android:layout_height="93dp"\r
-        android:layout_marginBottom="5dp"\r
-        android:layout_marginLeft="9dp"\r
-        android:layout_marginTop="5dp"\r
-        android:src="@drawable/ic_menu_archive" />\r
-\r
-    <TextView\r
-        android:id="@+id/Filename"\r
-        android:layout_width="95dp"\r
-        android:layout_height="wrap_content"\r
-        android:layout_marginLeft="4dp"\r
-        android:layout_marginRight="4dp"\r
-        android:ellipsize="middle"\r
-        android:singleLine="true"\r
-        android:text="TextView"\r
-        android:textColor="#303030"\r
-        android:textSize="16dip" />\r
-\r
-    <ImageView\r
-        android:id="@+id/imageView2"\r
-        android:layout_width="40dp"\r
-        android:layout_height="22dp"\r
-        android:layout_marginLeft="22dp"\r
-        android:src="@drawable/local_file_indicator" />\r
-\r
-    <TextView\r
-        android:id="@+id/file_size"\r
-        android:layout_width="wrap_content"\r
-        android:layout_height="wrap_content"\r
-        android:layout_weight=".5"\r
-        android:gravity="right"\r
-        android:text="TextView"\r
-        android:textColor="@color/list_item_lastmod_and_filesize_text"\r
-        android:textSize="12dip" />\r
-\r
     <FrameLayout\r
-        android:id="@+id/imageItemFrame"\r
-        android:layout_width="56dp"\r
-        android:layout_height="56dp"\r
-        android:focusable="false"\r
-        android:focusableInTouchMode="false" >\r
+        android:layout_width="match_parent"\r
+        android:layout_height="wrap_content"\r
+        android:layout_gravity="center_horizontal" >\r
 \r
         <ImageView\r
-            android:id="@+id/sharedIcon"\r
-            android:layout_width="wrap_content"\r
-            android:layout_height="wrap_content"\r
-            android:layout_marginBottom="4dp"\r
-            android:layout_marginLeft="4dp"\r
-            android:layout_marginRight="4dp"\r
-            android:src="@drawable/sharedlink" />\r
+            android:id="@+id/thumbnail"\r
+            android:layout_width="72dp"\r
+            android:layout_height="72dp"\r
+            android:layout_gravity="center_horizontal"\r
+            android:layout_marginLeft="10dp"\r
+            android:layout_marginRight="10dp"\r
+            android:src="@drawable/ic_menu_archive" />\r
 \r
-        <ImageView\r
-            android:id="@+id/sharedWithMeIcon"\r
+        <LinearLayout\r
             android:layout_width="wrap_content"\r
             android:layout_height="wrap_content"\r
-            android:layout_marginLeft="4dp"\r
-            android:layout_marginRight="4dp"\r
-            android:layout_marginTop="4dp"\r
-            android:src="@drawable/shared_with_me" />\r
+            android:layout_gravity="top|right"\r
+            android:orientation="vertical"\r
+            android:layout_margin="2dp">\r
+\r
+            <ImageView\r
+                android:id="@+id/sharedIcon"\r
+                android:layout_width="wrap_content"\r
+                android:layout_height="wrap_content"\r
+                android:layout_gravity="center"\r
+                android:layout_marginBottom="2dp"\r
+                android:src="@drawable/sharedlink" />\r
+\r
+            <ImageView\r
+                android:id="@+id/sharedWithMeIcon"\r
+                android:layout_width="wrap_content"\r
+                android:layout_height="wrap_content"\r
+                android:layout_gravity="center"\r
+                android:layout_marginTop="2dp"\r
+                android:src="@drawable/shared_with_me"\r
+                android:visibility="invisible" />\r
+        </LinearLayout>\r
 \r
         <ImageView\r
-            android:id="@+id/custom_checkbox"\r
-            android:layout_width="wrap_content"\r
-            android:layout_height="wrap_content"\r
-            android:layout_marginLeft="4dp"\r
-            android:layout_marginRight="4dp"\r
-            android:src="@android:drawable/checkbox_off_background" />\r
+            android:id="@+id/localFileIndicator"\r
+            android:layout_width="@dimen/file_icon_size"\r
+            android:layout_height="@dimen/file_icon_size"\r
+            android:layout_gravity="bottom|right"\r
+            android:layout_marginTop="2dp"\r
+            android:layout_marginRight="2dp"\r
+            android:src="@drawable/local_file_indicator" />\r
 \r
         <ImageView\r
-            android:id="@+id/imageView3"\r
-            android:layout_width="wrap_content"\r
-            android:layout_height="wrap_content"\r
+            android:id="@+id/favoriteIcon"\r
+            android:layout_width="15dp"\r
+            android:layout_height="15dp"\r
             android:layout_gravity="bottom|right"\r
-            android:layout_marginBottom="10dp"\r
+            android:layout_marginBottom="2dp"\r
             android:layout_marginRight="2dp"\r
             android:src="@drawable/ic_favorite" />\r
 \r
-        <TextView\r
-            android:id="@+id/last_mod"\r
-            android:layout_width="wrap_content"\r
-            android:layout_height="wrap_content"\r
-            android:layout_weight=".5"\r
-            android:text="TextView"\r
-            android:textColor="@color/list_item_lastmod_and_filesize_text"\r
-            android:textSize="12dip" />\r
+\r
+\r
     </FrameLayout>\r
 \r
-</LinearLayout>
\ No newline at end of file
+    <TextView\r
+        android:id="@+id/Filename"\r
+        android:layout_width="match_parent"\r
+        android:layout_height="wrap_content"\r
+        android:layout_marginLeft="4dp"\r
+        android:layout_marginRight="4dp"\r
+        android:ellipsize="middle"\r
+        android:gravity="center_horizontal"\r
+        android:singleLine="true"\r
+        android:text="TextView"\r
+        android:textColor="@color/textColor"\r
+        android:textSize="16dip" />\r
+\r
+</com.owncloud.android.ui.SquareLinearLayout>
\ No newline at end of file