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

removed unnecessary items from upload_list_item

Luke Owncloud 10 жил өмнө
parent
commit
fd6d57fa75

+ 1 - 60
res/layout/upload_list_item.xml

@@ -12,14 +12,6 @@
         android:focusable="false"
         android:focusableInTouchMode="false">
 
-        <ImageView
-            android:id="@+id/imageView2"
-            android:layout_width="@dimen/file_icon_size"
-            android:layout_height="@dimen/file_icon_size"
-            android:layout_gravity="center_vertical"
-            android:layout_marginLeft="22dp"
-            android:src="@drawable/local_file_indicator" />
-
         <ImageView
             android:id="@+id/imageView1"
             android:layout_width="@dimen/file_icon_size"
@@ -27,15 +19,7 @@
             android:layout_gravity="center_vertical"
             android:layout_marginLeft="9dp"
             android:src="@drawable/ic_menu_archive" />
-
-        <ImageView
-            android:id="@+id/imageView3"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom|right"
-            android:layout_marginBottom="10dp"
-            android:layout_marginRight="2dp"
-            android:src="@drawable/ic_favorite" />
+  
     </FrameLayout>
 
     <LinearLayout
@@ -54,7 +38,6 @@
             android:layout_marginRight="4dp"
             android:ellipsize="middle"
             android:singleLine="true"
-            android:text="TextView"
             android:textColor="#303030"
             android:textSize="16dip" />
 
@@ -70,7 +53,6 @@
                 android:id="@+id/upload_local_path"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="TextView"
                 android:layout_weight=".5"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:textSize="12dip"/>
@@ -80,7 +62,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:gravity="right"
-                android:text="TextView"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:layout_weight=".5"
                 android:textSize="12dip"/>
@@ -98,7 +79,6 @@
                 android:id="@+id/upload_status"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="TextView"
                 android:layout_weight=".5"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:textSize="12dip"/>
@@ -108,7 +88,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:gravity="right"
-                android:text="TextView"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:layout_weight=".5"
                 android:textSize="12dip"/>
@@ -117,42 +96,4 @@
 
     </LinearLayout>
 
-    <LinearLayout
-        android:layout_width="25dp"
-        android:layout_height="match_parent"
-        android:gravity="center_vertical"
-        android:orientation="vertical">
-
-    <ImageView
-        android:id="@+id/sharedIcon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:layout_marginLeft="4dp"
-        android:layout_marginBottom="4dp"
-        android:layout_marginRight="4dp"
-        android:src="@drawable/sharedlink" />
-
-    <ImageView
-        android:id="@+id/sharedWithMeIcon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:layout_marginLeft="4dp"
-        android:layout_marginRight="4dp"
-        android:layout_marginTop="4dp"
-        android:src="@drawable/shared_with_me" />
-
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/custom_checkbox"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
-        android:layout_marginLeft="4dp"
-        android:layout_marginRight="4dp"
-        android:gravity=""
-        android:src="@android:drawable/checkbox_off_background" />
-
 </LinearLayout>

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

@@ -200,46 +200,10 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
             } catch (NullPointerException e) {
             }            
 
-            TextView uploadDateV = (TextView) view.findViewById(R.id.upload_date);
+            TextView uploadDate = (TextView) view.findViewById(R.id.upload_date);
             CharSequence dateString = DisplayUtils.getRelativeDateTimeString(mActivity, uploadObject.getUploadTime()
                     .getTimeInMillis(), DateUtils.SECOND_IN_MILLIS, DateUtils.WEEK_IN_MILLIS, 0);
-            uploadDateV.setText(dateString);
-            ImageView checkBoxV = (ImageView) view.findViewById(R.id.custom_checkbox);
-            // if (!file.isDirectory()) {
-            // fileSizeV.setVisibility(View.VISIBLE);
-            // fileSizeV.setText(DisplayUtils.bytesToHumanReadable(file.length()));
-            // lastModV.setVisibility(View.VISIBLE);
-            // lastModV.setText(DisplayUtils.unixTimeToHumanReadable(file.lastModified()));
-            // ListView parentList = (ListView)parent;
-            // if (parentList.getChoiceMode() == ListView.CHOICE_MODE_NONE) {
-            // checkBoxV.setVisibility(View.GONE);
-            // } else {
-            // if (parentList.isItemChecked(position)) {
-            // checkBoxV.setImageResource(android.R.drawable.checkbox_on_background);
-            // } else {
-            // checkBoxV.setImageResource(android.R.drawable.checkbox_off_background);
-            // }
-            // checkBoxV.setVisibility(View.VISIBLE);
-            // }
-            //
-            // } else {
-            checkBoxV.setVisibility(View.GONE);
-            // }
-
-            view.findViewById(R.id.imageView2).setVisibility(View.INVISIBLE); // not
-                                                                              // GONE;
-                                                                              // the
-                                                                              // alignment
-                                                                              // changes;
-                                                                              // ugly
-                                                                              // way
-                                                                              // to
-                                                                              // keep
-                                                                              // it
-            view.findViewById(R.id.imageView3).setVisibility(View.GONE);
-
-            view.findViewById(R.id.sharedIcon).setVisibility(View.GONE);
-            view.findViewById(R.id.sharedWithMeIcon).setVisibility(View.GONE);
+            uploadDate.setText(dateString);
         }
 
         return view;