Эх сурвалжийг харах

use settings layout for upload list (remove group header background, add underline, remove group icons)

Luke Owncloud 10 жил өмнө
parent
commit
11efd022f9

+ 17 - 6
res/layout/upload_list_group.xml

@@ -1,14 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/ListItemLayout"
     android:layout_width="fill_parent"
-    android:background="@drawable/abs__ab_bottom_solid_light_holo"
     android:orientation="horizontal"
     android:layout_height="40dp">
 
+    <!-- 
     <FrameLayout
         android:layout_width="56dp"
-        android:layout_height="56dp"
+        android:layout_height="40dp"
         android:focusable="false"
         android:focusableInTouchMode="false">
 
@@ -19,7 +18,7 @@
             android:layout_gravity="center_vertical"
             android:layout_marginLeft="9dp"
             android:src="@drawable/ic_menu_archive" />
-    </FrameLayout>
+    </FrameLayout>  -->
 
     <LinearLayout
         android:layout_width="0dp"
@@ -27,7 +26,19 @@
         android:layout_weight="1"
         android:gravity="center_vertical"
         android:orientation="vertical" >
-
+        
+        <TextView 
+    android:id="@+id/uploadListGroupName"
+    style="?android:attr/listSeparatorTextViewStyle"  
+    		android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical" 
+            android:ellipsize="middle"
+            android:singleLine="true" 
+            android:divider="@null"
+			android:dividerHeight="0dp"
+			android:showDividers="none"
+    />
+<!-- 
         <TextView
             android:id="@+id/uploadListGroupName"
             android:layout_width="wrap_content"
@@ -40,7 +51,7 @@
             android:text="TextView"
             android:textColor="#303030"
             android:textSize="16dip" />
-
+ -->
     </LinearLayout>
 
 </LinearLayout>

+ 1 - 9
res/layout/upload_list_item.xml

@@ -2,7 +2,6 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/ListItemLayout"
     android:layout_width="fill_parent"
-    android:background="@drawable/list_selector"
     android:orientation="horizontal"
     android:layout_height="56dp">
 
@@ -16,8 +15,7 @@
             android:id="@+id/imageView1"
             android:layout_width="@dimen/file_icon_size"
             android:layout_height="@dimen/file_icon_size"
-            android:layout_gravity="center_vertical"
-            android:layout_marginLeft="9dp"
+            android:layout_gravity="center"
             android:src="@drawable/ic_menu_archive" />
   
     </FrameLayout>
@@ -34,8 +32,6 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center_vertical"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
             android:ellipsize="middle"
             android:singleLine="true"
             android:textColor="#303030"
@@ -45,8 +41,6 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
             android:weightSum="1">
 
             <TextView
@@ -71,8 +65,6 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:layout_marginRight="4dp"
             android:weightSum="1">
 
             <TextView

+ 4 - 0
res/layout/upload_list_layout.xml

@@ -6,6 +6,10 @@
         android:id="@+id/UploadListFragment"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+        android:paddingLeft="25dp"
+        android:paddingRight="25dp"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
         class="com.owncloud.android.ui.fragment.UploadListFragment" />
 
 </FrameLayout>

+ 2 - 2
src/com/owncloud/android/ui/adapter/ExpandableUploadListAdapter.java

@@ -294,8 +294,8 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
         }
         TextView tv = (TextView) convertView.findViewById(R.id.uploadListGroupName);
         tv.setText(group.getGroupName());
-        ImageView icon = (ImageView) convertView.findViewById(R.id.uploadListGroupIcon);
-        icon.setImageResource(group.getGroupIcon());
+//        ImageView icon = (ImageView) convertView.findViewById(R.id.uploadListGroupIcon);
+//        icon.setImageResource(group.getGroupIcon());
         return convertView;
     }