OC-167
authormasensio <masensio@solidgear.es>
Fri, 31 May 2013 12:05:06 +0000 (14:05 +0200)
committermasensio <masensio@solidgear.es>
Fri, 31 May 2013 12:05:06 +0000 (14:05 +0200)
.classpath
.settings/org.eclipse.jdt.core.prefs
lint.xml [new file with mode: 0644]
oc_jb_workaround/.classpath
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
tests/.classpath
tests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]

index 3f9691c..5176974 100644 (file)
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
-       <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+       <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+       <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
        <classpathentry kind="output" path="bin/classes"/>
index 0ff9ee1..81acefe 100644 (file)
@@ -1,4 +1,7 @@
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/lint.xml b/lint.xml
new file mode 100644 (file)
index 0000000..ee0eead
--- /dev/null
+++ b/lint.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lint>
+</lint>
\ No newline at end of file
index 3f9691c..3a0c88f 100644 (file)
@@ -4,5 +4,6 @@
        <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
+       <classpathentry kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
        <classpathentry kind="output" path="bin/classes"/>
 </classpath>
index 59b25cc..0f94510 100644 (file)
@@ -20,16 +20,6 @@ package com.owncloud.android.ui.adapter;
 
 import java.util.Vector;
 
-import com.owncloud.android.AccountUtils;
-import com.owncloud.android.DisplayUtils;
-import com.owncloud.android.datamodel.DataStorageManager;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
-import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
-import com.owncloud.android.ui.activity.TransferServiceGetter;
-
-import com.owncloud.android.R;
-
 import android.accounts.Account;
 import android.content.Context;
 import android.view.LayoutInflater;
@@ -41,6 +31,15 @@ import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
 
+import com.owncloud.android.AccountUtils;
+import com.owncloud.android.DisplayUtils;
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.DataStorageManager;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
+import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
+import com.owncloud.android.ui.activity.TransferServiceGetter;
+
 /**
  * This Adapter populates a ListView with all files and folders in an ownCloud
  * instance.
@@ -168,11 +167,20 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                 
             } 
             else {
-               fileSizeV.setVisibility(View.VISIBLE);
+               
                getDirectorySizeNumber(file,true);
-               fileSizeV.setText(DisplayUtils.bytesToHumanReadable((totalSizeOfDirectoriesRecursive == null) ? 0 : totalSizeOfDirectoriesRecursive));
-               lastModV.setVisibility(View.VISIBLE);
-               lastModV.setText(DisplayUtils.unixTimeToHumanReadable((lastModifiedOfAllSubdirectories == null) ? 0 :lastModifiedOfAllSubdirectories));
+               if (lastModifiedOfAllSubdirectories == null)
+               {
+                   lastModV.setVisibility(View.GONE);
+                   fileSizeV.setVisibility(View.GONE);
+               }
+               else
+               {
+                   lastModV.setVisibility(View.VISIBLE);
+                   lastModV.setText(DisplayUtils.unixTimeToHumanReadable(lastModifiedOfAllSubdirectories));
+                   fileSizeV.setVisibility(View.VISIBLE);
+                   fileSizeV.setText(DisplayUtils.bytesToHumanReadable((totalSizeOfDirectoriesRecursive == null) ? 0 : totalSizeOfDirectoriesRecursive));
+               }
                checkBoxV.setVisibility(View.GONE);
                view.findViewById(R.id.imageView3).setVisibility(View.GONE);
             }
index 4abbae7..69457b1 100644 (file)
@@ -6,5 +6,6 @@
        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
+       <classpathentry kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
        <classpathentry kind="output" path="bin/classes"/>
 </classpath>
diff --git a/tests/.settings/org.eclipse.jdt.core.prefs b/tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..b080d2d
--- /dev/null
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6