diff --git a/build.gradle b/build.gradle index 46308acaac..57ec86e5b3 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:0.14.0' + classpath 'com.android.tools.build:gradle:1.0.0' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8d63f892d1..5a1c438342 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Oct 15 10:45:44 CEST 2014 +#Sun Jan 18 17:01:43 CET 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip diff --git a/owncloud-android-library b/owncloud-android-library index 8261865ff2..cbb1c524ea 160000 --- a/owncloud-android-library +++ b/owncloud-android-library @@ -1 +1 @@ -Subproject commit 8261865ff24c1bfc05be19ae9364a66dac8f26c3 +Subproject commit cbb1c524ea989e649721ab4f8ece760701abf56b diff --git a/res/values/dims.xml b/res/values/dims.xml index d433cba339..955f87e6d0 100644 --- a/res/values/dims.xml +++ b/res/values/dims.xml @@ -18,4 +18,5 @@ --> 32dp + 128dp diff --git a/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java b/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java index eeb01829d0..3cd9b3f81a 100644 --- a/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java +++ b/src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java @@ -173,26 +173,7 @@ public class ThumbnailsCacheManager { } mFile = params[0]; - final String imageKey = String.valueOf(mFile.getRemoteId()); - - // Check disk cache in background thread - thumbnail = getBitmapFromDiskCache(imageKey); - - // Not found in disk cache - if (thumbnail == null || mFile.needsUpdateThumbnail()) { - // Use Width of imageView -> no blurry images on big screens - int px = mImageViewReference.get().getWidth(); - - if (mFile.isDown()){ - Bitmap bitmap = BitmapUtils.decodeSampledBitmapFromFile( - mFile.getStoragePath(), px, px); - - if (bitmap != null) { - thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px); - - // Add thumbnail to cache - addBitmapToCache(imageKey, thumbnail); - + if (mFile instanceof OCFile) { thumbnail = doOCFileInBackground(); } else if (mFile instanceof File) { @@ -262,7 +243,7 @@ public class ThumbnailsCacheManager { private int getThumbnailDimension(){ // Converts dp to pixel Resources r = MainApp.getAppContext().getResources(); - return (int) Math.round(r.getDimension(R.dimen.file_icon_size)); + return (int) Math.round(r.getDimension(R.dimen.file_icon_size_grid)); } private Bitmap doOCFileInBackground() { diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index ad39976290..62a772ef76 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -302,7 +302,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { if (thumbnail != null && !file.needsUpdateThumbnail()){ fileIcon.setImageBitmap(thumbnail); } else { - // generate new Thumbnail if (ThumbnailsCacheManager.cancelPotentialWork(file, fileIcon)) { final ThumbnailsCacheManager.ThumbnailGenerationTask task = @@ -320,15 +319,11 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { ); fileIcon.setImageDrawable(asyncDrawable); task.execute(file); - } } } else { fileIcon.setImageResource(DisplayUtils.getFileTypeIconId(file.getMimetype(), file.getFileName())); } - else { - fileIcon.setImageResource(DisplayUtils.getResourceId(file.getMimetype(), file.getFileName())); - } } else { // Folder if (checkIfFileIsSharedWithMe(file)) { @@ -568,8 +563,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { mFiles = FileStorageUtils.sortFolder(mFiles); notifyDataSetChanged(); - } - sortDirectory(); } private CharSequence showRelativeTimestamp(OCFile file){ diff --git a/src/com/owncloud/android/ui/fragment/ExtendedListFragment.java b/src/com/owncloud/android/ui/fragment/ExtendedListFragment.java index def08c519e..ce09686f51 100644 --- a/src/com/owncloud/android/ui/fragment/ExtendedListFragment.java +++ b/src/com/owncloud/android/ui/fragment/ExtendedListFragment.java @@ -77,9 +77,11 @@ implements OnItemClickListener, OnEnforceableRefreshListener { public GridView getGridView() { return imageView; } + public void setFooterView(View footer) { - mList.addFooterView(footer, null, false); - mList.invalidate(); + // TODO find solution + // mList.addFooterView(footer, null, false); + // mList.invalidate(); } diff --git a/src/com/owncloud/android/utils/DisplayUtils.java b/src/com/owncloud/android/utils/DisplayUtils.java index 32d9017372..c93e792225 100644 --- a/src/com/owncloud/android/utils/DisplayUtils.java +++ b/src/com/owncloud/android/utils/DisplayUtils.java @@ -228,7 +228,7 @@ public class DisplayUtils { /** * Converts Unix time to human readable format - * @param miliseconds that have passed since 01/01/1970 + * @param milliseconds that have passed since 01/01/1970 * @return The human readable time for the users locale */ public static String unixTimeToHumanReadable(long milliseconds) {