Andy Scherzinger 8 жил өмнө
parent
commit
4c31ca1ebe

BIN
res/drawable-hdpi/ic_dots_vertical.png


BIN
res/drawable-mdpi/ic_dots_vertical.png


BIN
res/drawable-xhdpi/ic_dots_vertical.png


BIN
res/drawable-xxhdpi/ic_dots_vertical.png


BIN
res/drawable-xxxhdpi/ic_dots_vertical.png


+ 18 - 10
res/layout/folder_sync_item_header.xml

@@ -20,27 +20,33 @@
 -->
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content">
+                android:layout_height="wrap_content"
+                android:padding="@dimen/standard_padding">
 
     <TextView
         android:id="@+id/title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignBottom="@+id/syncStatusButton"
+        android:layout_alignBottom="@+id/buttonBar"
         android:layout_alignParentLeft="true"
-        android:layout_alignTop="@+id/syncStatusButton"
-        android:layout_toLeftOf="@+id/syncStatusButton"
+        android:layout_alignTop="@+id/buttonBar"
+        android:layout_toLeftOf="@+id/buttonBar"
         android:gravity="start|center_vertical"
         android:text="Header Text"
+        android:textStyle="bold"
+        android:ellipsize="middle"
         android:textColor="?android:textColorPrimary"/>
 
+    <LinearLayout android:id="@+id/buttonBar"
+        android:layout_width="wrap_content"
+                  android:layout_height="wrap_content"
+                  android:layout_alignParentRight="true">
     <ImageButton
         android:id="@+id/syncStatusButton"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_marginBottom="@dimen/standard_half_margin"
-        android:layout_marginTop="@dimen/standard_half_margin"
+        android:layout_margin="@dimen/standard_half_margin"
+        android:background="@color/transparent"
         android:clickable="true"
         android:src="@drawable/ic_cloud_sync_off"/>
 
@@ -48,10 +54,12 @@
         android:id="@+id/settingsButton"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_marginBottom="@dimen/standard_half_margin"
+        android:layout_marginLeft="@dimen/standard_half_margin"
         android:layout_marginTop="@dimen/standard_half_margin"
+        android:layout_marginBottom="@dimen/standard_half_margin"
+        android:background="@color/transparent"
         android:clickable="true"
-        android:src="@drawable/ic_settings"/>
+        android:src="@drawable/ic_dots_vertical"/>
+    </LinearLayout>
 
 </RelativeLayout>

+ 0 - 1
res/layout/folder_sync_layout.xml

@@ -39,7 +39,6 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:clipToPadding="false"
-            android:padding="@dimen/standard_padding"
             android:scrollbarStyle="outsideOverlay"
             android:scrollbars="vertical"/>
 

+ 74 - 0
res/layout/grid_sync_item.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2016 Andy Scherzinger
+  Copyright (C) 2016 Nextcloud.
+
+  This program is free software; you can redistribute it and/or
+  modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+  License as published by the Free Software Foundation; either
+  version 3 of the License, or any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+  You should have received a copy of the GNU Affero General Public
+  License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<LinearLayout android:id="@+id/ListItemLayout"
+              xmlns:android="http://schemas.android.com/apk/res/android"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:layout_gravity="center_horizontal"
+              android:background="@drawable/list_selector"
+              android:gravity="center_horizontal"
+              android:orientation="vertical">
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <com.owncloud.android.ui.SquareImageView
+            android:id="@+id/thumbnail"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:paddingLeft="8dp"
+            android:paddingRight="8dp"
+            android:scaleType="centerCrop"
+            android:src="@drawable/ic_menu_archive"/>
+
+        <LinearLayout
+            android:id="@+id/counterLayout"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical|center_horizontal"
+            android:gravity="center_horizontal"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/counter"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@android:drawable/checkbox_off_background"
+                android:text="127"
+                android:textColor="#ccffffff"
+                android:textSize="22dp"
+                android:textStyle="bold"/>
+
+            <TextView
+                android:id="@+id/next"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="4dp"
+                android:layout_marginRight="4dp"
+                android:text=">"
+                android:textColor="#cccccccc"
+                android:textSize="22dp"
+                android:textStyle="bold"/>
+        </LinearLayout>
+    </FrameLayout>
+
+</LinearLayout>

+ 5 - 4
src/com/owncloud/android/ui/adapter/FolderSyncAdapter.java

@@ -23,7 +23,6 @@ package com.owncloud.android.ui.adapter;
 
 import android.content.Context;
 import android.support.v7.widget.RecyclerView;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
@@ -69,7 +68,7 @@ public class FolderSyncAdapter extends SectionedRecyclerViewAdapter<FolderSyncAd
 
     @Override
     public void onClick(View v) {
-        Log.d(TAG, v.getTag().toString());
+
     }
 
     @Override
@@ -89,7 +88,8 @@ public class FolderSyncAdapter extends SectionedRecyclerViewAdapter<FolderSyncAd
 
     @Override
     public void onBindHeaderViewHolder(MainViewHolder holder, int section) {
-        holder.title.setText(mMediaFolders.get(section).folder);
+        holder.title.setText(mMediaFolders.get(section).folder.substring(mMediaFolders.get(section).folder
+                .lastIndexOf("/")+1, mMediaFolders.get(section).folder.length()));
         holder.syncStatusButton.setVisibility(View.VISIBLE);
         holder.syncStatusButton.setTag(section);
         holder.syncStatusButton.setOnTouchListener(this);
@@ -159,7 +159,8 @@ public class FolderSyncAdapter extends SectionedRecyclerViewAdapter<FolderSyncAd
     @Override
     public MainViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
         View v = LayoutInflater.from(parent.getContext()).inflate(
-                viewType == VIEW_TYPE_HEADER ? R.layout.folder_sync_item_header : R.layout.grid_image, parent, false);
+                viewType == VIEW_TYPE_HEADER ?
+                        R.layout.folder_sync_item_header : R.layout.grid_sync_item, parent, false);
         return new MainViewHolder(v);
     }