diff --git a/app/build.gradle b/app/build.gradle index 11832d83..f73b061a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -38,14 +38,14 @@ ext { } android { - compileSdkVersion 24 - buildToolsVersion "24.0.3" + compileSdkVersion 25 + buildToolsVersion "25.0.1" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "com.liato.bankdroid" minSdkVersion 9 - targetSdkVersion 24 + targetSdkVersion 25 versionCode 224 + gitVersionCode versionName gitVersionName } @@ -87,7 +87,7 @@ dependencies { compile project(':bankdroid-core') compile 'com.jakewharton:butterknife:6.1.0' compile 'com.jakewharton.timber:timber:4.3.1' - compile "com.android.support:appcompat-v7:24.2.1" + compile "com.android.support:appcompat-v7:25.2.0" compile 'com.google.collections:google-collections:1.0' compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { transitive = true; diff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java index 98c8a2be..78d7ff8f 100644 --- a/app/src/main/java/com/liato/bankdroid/MainActivity.java +++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java @@ -59,7 +59,7 @@ public class MainActivity extends LockableActivity { protected static boolean showHidden = false; - private static Bank selectedBank = null; + private Bank selectedBank = null; private static Account selectedAccount = null; @@ -241,7 +241,7 @@ protected void onCreate() { final Button btnHide = (Button) root.findViewById(R.id.btnHide); final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide); final Button btnWWW = (Button) root.findViewById(R.id.btnWWW); - if (selectedBank.getHideAccounts()) { + if (parent.selectedBank.getHideAccounts()) { btnHide.setVisibility(View.GONE); btnUnhide.setVisibility(View.VISIBLE); btnUnhide.setOnClickListener(this); @@ -250,7 +250,7 @@ protected void onCreate() { btnUnhide.setVisibility(View.GONE); btnHide.setOnClickListener(this); } - if (selectedBank.isWebViewEnabled()) { + if (parent.selectedBank.isWebViewEnabled()) { btnWWW.setOnClickListener(this); } else { btnWWW.setVisibility(View.GONE); @@ -270,29 +270,29 @@ public void onClick(final View v) { case R.id.btnHide: case R.id.btnUnhide: this.dismiss(); - selectedBank.toggleHideAccounts(); - DBAdapter.save(selectedBank, context); + parent.selectedBank.toggleHideAccounts(); + DBAdapter.save(parent.selectedBank, context); parent.refreshView(); return; case R.id.btnWWW: - if (selectedBank != null && selectedBank.isWebViewEnabled()) { + if (parent.selectedBank != null && parent.selectedBank.isWebViewEnabled()) { //Uri uri = Uri.parse(selectedBank.getURL()); //Intent intent = new Intent(Intent.ACTION_VIEW, uri); final Intent intent = new Intent(context, WebViewActivity.class); - intent.putExtra("bankid", selectedBank.getDbId()); + intent.putExtra("bankid", parent.selectedBank.getDbId()); context.startActivity(intent); } this.dismiss(); return; case R.id.btnEdit: final Intent intent = new Intent(context, BankEditActivity.class); - intent.putExtra("id", selectedBank.getDbId()); + intent.putExtra("id", parent.selectedBank.getDbId()); context.startActivity(intent); this.dismiss(); return; case R.id.btnRefresh: this.dismiss(); - new DataRetrieverTask(parent, selectedBank.getDbId()).execute(); + new DataRetrieverTask(parent, parent.selectedBank.getDbId()).execute(); return; case R.id.btnRemove: this.dismiss(); @@ -307,7 +307,7 @@ public void onClick(final View v) { public void onClick(final DialogInterface dialog, final int id) { final DBAdapter db = new DBAdapter(context); - db.deleteBank(selectedBank.getDbId()); + db.deleteBank(parent.selectedBank.getDbId()); dialog.cancel(); parent.refreshView(); } diff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java index 4d1ce556..80b12c78 100644 --- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java +++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java @@ -154,7 +154,7 @@ public List getValues() { @Override public void validate(String value) throws IllegalArgumentException { - if (isRequired()) { + if (required) { if (value == null || value.trim().isEmpty()) { throw new IllegalArgumentException(String.format("%s is required", getLabel())); } @@ -168,7 +168,7 @@ private String getLocaleString(String key) { if (!isLocale()) { return null; } - String propertyKey = String.format("field.%s.%s", getReference(), key); + String propertyKey = String.format("field.%s.%s", reference, key); return resourceBundle.containsKey(propertyKey) ? resourceBundle.getString(propertyKey) : propertyKey; } diff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle index 2cda7789..e9b42906 100644 --- a/bankdroid-legacy/build.gradle +++ b/bankdroid-legacy/build.gradle @@ -2,13 +2,13 @@ apply plugin: 'com.android.library' apply from: '../config/quality/quality.gradle' android { - compileSdkVersion 24 - buildToolsVersion "24.0.3" + compileSdkVersion 25 + buildToolsVersion "25.0.1" useLibrary 'org.apache.http.legacy' defaultConfig { minSdkVersion 9 - targetSdkVersion 24 + targetSdkVersion 25 versionCode 1 versionName "1.0" } @@ -27,7 +27,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':bankdroid-interface') - compile 'com.android.support:appcompat-v7:24.2.1' + compile 'com.android.support:appcompat-v7:25.2.0' compile 'com.jakewharton.timber:timber:4.3.1' compile ('org.apache.commons:commons-io:1.3.2') {exclude module: 'commons-io'} compile 'org.jsoup:jsoup:1.7.3' diff --git a/build.gradle b/build.gradle index 76cbdfba..bf6f81e6 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:2.2.3' + classpath 'com.android.tools.build:gradle:2.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -30,5 +30,5 @@ subprojects { } task wrapper(type: Wrapper) { - gradleVersion = '3.1' + gradleVersion = '3.3' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 88935157..382630b6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Sep 29 21:09:55 CEST 2016 +#Thu Mar 02 21:11:13 CET 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip