diff --git a/app/build.gradle b/app/build.gradle index 938d4299..2262d3ce 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'android-apt' android { compileSdkVersion 23 - buildToolsVersion '23.0.0' + buildToolsVersion '23.0.1' useLibrary 'org.apache.http.legacy' defaultConfig { @@ -34,16 +34,18 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'org.androidannotations:androidannotations-api:3.2' + compile 'org.androidannotations:androidannotations-api:3.3.2' compile 'com.j256.ormlite:ormlite-core:4.48' compile 'com.j256.ormlite:ormlite-android:4.48' - compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3' - compile 'com.android.support:appcompat-v7:23.0.1' - compile 'com.android.support:support-annotations:23.0.1' - compile 'com.getbase:floatingactionbutton:1.8.0' - compile 'com.afollestad:material-dialogs:0.6.3.3' - compile 'com.nispok:snackbar:2.10.6' - apt 'org.androidannotations:androidannotations:3.2' + compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' + compile 'com.android.support:appcompat-v7:23.1.0' + compile 'com.android.support:support-annotations:23.1.0' + compile 'com.getbase:floatingactionbutton:1.10.1' + compile 'com.nispok:snackbar:2.11.0' + compile('com.github.afollestad.material-dialogs:core:0.8.5.0@aar') { + transitive = true + } + apt 'org.androidannotations:androidannotations:3.3.2' } apt { diff --git a/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java b/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java index f9e83af9..fea9a15c 100644 --- a/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java +++ b/app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java @@ -129,7 +129,7 @@ public class ApplicationSettings { */ public int getMaxNormalServer() { for (int i = 0; true; i++) { - if (prefs.getString("server_type_" + i, null) == null) + if (prefs.getString("server_type_" + i, null) == null || prefs.getString("server_address_" + i, null) == null) return i - 1; } } diff --git a/app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java b/app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java index cf468199..22ad04a5 100644 --- a/app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java +++ b/app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java @@ -23,7 +23,7 @@ import android.text.Spannable; import android.text.SpannableString; import android.text.style.TypefaceSpan; -import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiscCache; +import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiskCache; import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; import com.nostra13.universalimageloader.cache.memory.impl.UsingFreqLimitedMemoryCache; import com.nostra13.universalimageloader.core.DisplayImageOptions; @@ -123,17 +123,17 @@ public class NavigationHelper { if (imageCache == null) { imageCache = ImageLoader.getInstance(); try { - LruDiscCache diskCache = new LruDiscCache(context.getCacheDir(), null, new Md5FileNameGenerator(), 640000, 25); + LruDiskCache diskCache = new LruDiskCache(context.getCacheDir(), null, new Md5FileNameGenerator(), 640000, 25); // @formatter:off Builder imageCacheBuilder = new Builder(context) .defaultDisplayImageOptions( new DisplayImageOptions.Builder() - .cacheInMemory() - .cacheOnDisc() + .cacheInMemory(true) + .cacheOnDisk(true) .imageScaleType(ImageScaleType.IN_SAMPLE_INT) .showImageForEmptyUri(R.drawable.ic_launcher).build()) .memoryCache(new UsingFreqLimitedMemoryCache(1024 * 1024)) - .discCache(diskCache); + .diskCache(diskCache); imageCache.init(imageCacheBuilder.build()); // @formatter:on } catch (IOException e) { diff --git a/build.gradle b/build.gradle index 427bbc33..dca0e3b0 100644 --- a/build.gradle +++ b/build.gradle @@ -12,5 +12,6 @@ allprojects { repositories { jcenter() mavenLocal() + maven { url "https://jitpack.io" } } }