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

replaced the icons and header coloring

Andy Scherzinger 9 жил өмнө
parent
commit
fd39e9168b

+ 1 - 0
res/layout/upload_list_group.xml

@@ -13,6 +13,7 @@
        android:dividerHeight="0dp"
        android:ellipsize="middle"
        android:showDividers="none"
+       android:textColor="@color/color_accent"
 	/>
    
     <!-- This would be just too many buttons. 

+ 22 - 14
res/layout/upload_list_item.xml

@@ -1,9 +1,9 @@
 <?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:layout_width="match_parent"
     android:orientation="horizontal"
-    android:layout_height="wrap_content">
+    android:layout_height="56dp">
 
     <FrameLayout
         android:layout_width="56dp"
@@ -22,7 +22,7 @@
 
     <LinearLayout
         android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_height="match_parent"
         android:layout_weight="1"
         android:gravity="center_vertical"
         android:orientation="vertical" >
@@ -35,6 +35,7 @@
             android:ellipsize="middle"
             android:singleLine="true"
             android:textColor="#303030"
+            android:text="TextView"
             android:textSize="16dip" />
 
         
@@ -49,6 +50,9 @@
                 android:layout_height="wrap_content"
                 android:layout_weight=".5"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
+                android:ellipsize="middle"
+                android:singleLine="true"
+                android:text="TextView"
                 android:textSize="12dip"/>
 
             <TextView
@@ -57,7 +61,10 @@
                 android:layout_height="wrap_content"
                 android:gravity="right"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
+                android:ellipsize="middle"
+                android:singleLine="true"
                 android:layout_weight=".5"
+                android:text="TextView"
                 android:textSize="12dip"/>
 
         </LinearLayout>
@@ -65,7 +72,7 @@
         <ProgressBar
             android:id="@+id/upload_progress_bar"
             style="?android:attr/progressBarStyleHorizontal"
-             android:layout_width="match_parent"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:visibility="gone"
              />
@@ -81,6 +88,7 @@
                 android:layout_height="wrap_content"
                 android:layout_weight=".5"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
+                android:text="TextView"
                 android:textSize="12dip"/>
 
             <TextView
@@ -90,6 +98,7 @@
                 android:gravity="right"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:layout_weight=".5"
+                android:text="TextView"
                 android:textSize="12dip"/>
 
         </LinearLayout>
@@ -98,21 +107,20 @@
 
     
     <FrameLayout
-        android:layout_width="40dp"
+        android:layout_width="56dp"
         android:layout_height="match_parent"
         android:focusable="false"
         android:focusableInTouchMode="false"
         android:paddingLeft="8dp"
      >
-    
-     <Button
-        android:id="@+id/upload_right_button"
-        android:background ="@drawable/btn_small_round"
-        android:layout_width="30dp"
-        android:layout_height="30dp"
-        android:layout_gravity="center"
-        android:focusable="false"
-        android:focusableInTouchMode="false"
+
+        <ImageButton
+            android:id="@+id/upload_right_button"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:layout_gravity="center"
+            android:src="@drawable/ic_cancel"
+            android:background="@android:color/transparent"
      />
 
 	</FrameLayout>

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

@@ -18,6 +18,7 @@ import android.view.ViewGroup;
 import android.widget.BaseExpandableListAdapter;
 import android.widget.Button;
 import android.widget.ExpandableListView;
+import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.ProgressBar;
 import android.widget.TextView;
@@ -239,10 +240,11 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
             }
             statusView.setText(status);
 
-            Button rightButton = (Button) view.findViewById(R.id.upload_right_button);
+            ImageButton rightButton = (ImageButton) view.findViewById(R.id.upload_right_button);
             if (UploadUtils.userCanRetryUpload(uploadObject)
                     && uploadObject.getUploadStatus() != UploadStatus.UPLOAD_SUCCEEDED) {
-                rightButton.setText("\u21BA"); //Anticlockwise Open Circle Arrow U+21BA
+                //Refresh
+                rightButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_action_refresh_grey));
                 rightButton.setOnClickListener(new OnClickListener() {                
                     @Override
                     public void onClick(View v) {
@@ -250,7 +252,8 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
                     }
                 });
             } else if (UploadUtils.userCanCancelUpload(uploadObject)) {
-                rightButton.setText("\u274C"); //Cross Mark U+274C
+                //Cancel
+                rightButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_cancel));
                 rightButton.setOnClickListener(new OnClickListener() {                
                     @Override
                     public void onClick(View v) {
@@ -258,7 +261,8 @@ public class ExpandableUploadListAdapter extends BaseExpandableListAdapter imple
                     }
                 });
             } else {
-                rightButton.setText("\u267B"); //Black Universal Recycling Symbol U+267B
+                //Delete
+                rightButton.setImageDrawable(mActivity.getDrawable(R.drawable.ic_delete));
                 rightButton.setOnClickListener(new OnClickListener() {                
                     @Override
                     public void onClick(View v) {