Browse Source

improve auto upload list header

AndyScherzinger 7 years ago
parent
commit
0db19eae12

+ 12 - 12
src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.java

@@ -111,11 +111,11 @@ public class SyncedFolderAdapter extends SectionedRecyclerViewAdapter<SyncedFold
         holder.title.setText(mSyncFolderItems.get(section).getFolderName());
 
         if (MediaFolderType.VIDEO == mSyncFolderItems.get(section).getType()) {
-            holder.type.setImageResource(R.drawable.ic_video_18dp);
+            holder.type.setImageResource(R.drawable.video_32dp);
         } else if (MediaFolderType.IMAGE == mSyncFolderItems.get(section).getType()) {
-            holder.type.setImageResource(R.drawable.ic_image_18dp);
+            holder.type.setImageResource(R.drawable.image_32dp);
         } else {
-            holder.type.setImageResource(R.drawable.ic_folder_star_18dp);
+            holder.type.setImageResource(R.drawable.folder_star_32dp);
         }
 
         holder.syncStatusButton.setVisibility(View.VISIBLE);
@@ -208,15 +208,15 @@ public class SyncedFolderAdapter extends SectionedRecyclerViewAdapter<SyncedFold
 
         private MainViewHolder(View itemView) {
             super(itemView);
-            mainHeaderContainer = (RelativeLayout) itemView.findViewById(R.id.header_container);
-            image = (ImageView) itemView.findViewById(R.id.thumbnail);
-            title = (TextView) itemView.findViewById(R.id.title);
-            type = (ImageView) itemView.findViewById(R.id.type);
-            menuButton = (ImageButton) itemView.findViewById(R.id.settingsButton);
-            syncStatusButton = (ImageButton) itemView.findViewById(R.id.syncStatusButton);
-            counterBar = (LinearLayout) itemView.findViewById(R.id.counterLayout);
-            counterValue = (TextView) itemView.findViewById(R.id.counter);
-            thumbnailDarkener = (ImageView) itemView.findViewById(R.id.thumbnailDarkener);
+            mainHeaderContainer = itemView.findViewById(R.id.header_container);
+            image = itemView.findViewById(R.id.thumbnail);
+            title = itemView.findViewById(R.id.title);
+            type = itemView.findViewById(R.id.type);
+            menuButton = itemView.findViewById(R.id.settingsButton);
+            syncStatusButton = itemView.findViewById(R.id.syncStatusButton);
+            counterBar = itemView.findViewById(R.id.counterLayout);
+            counterValue = itemView.findViewById(R.id.counter);
+            thumbnailDarkener = itemView.findViewById(R.id.thumbnailDarkener);
         }
     }
 

+ 8 - 0
src/main/res/drawable/folder_star_32dp.xml

@@ -0,0 +1,8 @@
+<!-- drawable/folder_star.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#757575" android:pathData="M20,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8A2,2 0 0,0 20,6M17.94,17L15,15.28L12.06,17L12.84,13.67L10.25,11.43L13.66,11.14L15,8L16.34,11.14L19.75,11.43L17.16,13.67L17.94,17Z" />
+</vector>

+ 8 - 0
src/main/res/drawable/image_32dp.xml

@@ -0,0 +1,8 @@
+<!-- drawable/image.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#757575" android:pathData="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z" />
+</vector>

+ 8 - 0
src/main/res/drawable/video_32dp.xml

@@ -0,0 +1,8 @@
+<!-- drawable/video.xml -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:height="32dp"
+    android:width="32dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+    <path android:fillColor="#757575" android:pathData="M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z" />
+</vector>

+ 5 - 7
src/main/res/layout/synced_folders_item_header.xml

@@ -46,14 +46,12 @@
 
             <ImageView
                 android:id="@+id/type"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
+                android:layout_width="24dp"
+                android:layout_height="24dp"
                 android:layout_gravity="start|center_vertical"
-                android:paddingRight="@dimen/standard_half_padding"
-                android:paddingEnd="@dimen/standard_half_padding"
-                android:paddingStart="@dimen/zero"
-                android:paddingLeft="@dimen/zero"
-                android:src="@drawable/ic_image_18dp"
+                android:layout_marginRight="32dp"
+                android:layout_marginEnd="32dp"
+                android:src="@drawable/image_32dp"
                 android:contentDescription="@string/synced_folders_type"/>
 
             <TextView