Browse Source

Updated dependencies and build tools.

pull/280/head
Eric Kok 9 years ago
parent
commit
1fb2b10a27
  1. 20
      app/build.gradle
  2. 2
      app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java
  3. 10
      app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java
  4. 1
      build.gradle

20
app/build.gradle

@ -3,7 +3,7 @@ apply plugin: 'android-apt' @@ -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 { @@ -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 {

2
app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java

@ -129,7 +129,7 @@ public class ApplicationSettings { @@ -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;
}
}

10
app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java

@ -23,7 +23,7 @@ import android.text.Spannable; @@ -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 { @@ -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) {

1
build.gradle

@ -12,5 +12,6 @@ allprojects { @@ -12,5 +12,6 @@ allprojects {
repositories {
jcenter()
mavenLocal()
maven { url "https://jitpack.io" }
}
}

Loading…
Cancel
Save