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'
android { android {
compileSdkVersion 23 compileSdkVersion 23
buildToolsVersion '23.0.0' buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
defaultConfig { defaultConfig {
@ -34,16 +34,18 @@ android {
dependencies { dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) 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-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48' compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3' compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:support-annotations:23.0.1' compile 'com.android.support:support-annotations:23.1.0'
compile 'com.getbase:floatingactionbutton:1.8.0' compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.afollestad:material-dialogs:0.6.3.3' compile 'com.nispok:snackbar:2.11.0'
compile 'com.nispok:snackbar:2.10.6' compile('com.github.afollestad.material-dialogs:core:0.8.5.0@aar') {
apt 'org.androidannotations:androidannotations:3.2' transitive = true
}
apt 'org.androidannotations:androidannotations:3.3.2'
} }
apt { apt {

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

@ -129,7 +129,7 @@ public class ApplicationSettings {
*/ */
public int getMaxNormalServer() { public int getMaxNormalServer() {
for (int i = 0; true; i++) { 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; return i - 1;
} }
} }

10
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.SpannableString;
import android.text.style.TypefaceSpan; 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.disc.naming.Md5FileNameGenerator;
import com.nostra13.universalimageloader.cache.memory.impl.UsingFreqLimitedMemoryCache; import com.nostra13.universalimageloader.cache.memory.impl.UsingFreqLimitedMemoryCache;
import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.DisplayImageOptions;
@ -123,17 +123,17 @@ public class NavigationHelper {
if (imageCache == null) { if (imageCache == null) {
imageCache = ImageLoader.getInstance(); imageCache = ImageLoader.getInstance();
try { 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 // @formatter:off
Builder imageCacheBuilder = new Builder(context) Builder imageCacheBuilder = new Builder(context)
.defaultDisplayImageOptions( .defaultDisplayImageOptions(
new DisplayImageOptions.Builder() new DisplayImageOptions.Builder()
.cacheInMemory() .cacheInMemory(true)
.cacheOnDisc() .cacheOnDisk(true)
.imageScaleType(ImageScaleType.IN_SAMPLE_INT) .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
.showImageForEmptyUri(R.drawable.ic_launcher).build()) .showImageForEmptyUri(R.drawable.ic_launcher).build())
.memoryCache(new UsingFreqLimitedMemoryCache(1024 * 1024)) .memoryCache(new UsingFreqLimitedMemoryCache(1024 * 1024))
.discCache(diskCache); .diskCache(diskCache);
imageCache.init(imageCacheBuilder.build()); imageCache.init(imageCacheBuilder.build());
// @formatter:on // @formatter:on
} catch (IOException e) { } catch (IOException e) {

1
build.gradle

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

Loading…
Cancel
Save