From 217cf910a66d7d8b4e5027e1cac23df9e4d0e58d Mon Sep 17 00:00:00 2001 From: mmk2410 Date: Sat, 16 May 2015 23:19:46 +0200 Subject: [PATCH] Version 2.2.1: Donation item only shown, when nothing is donated --- app/build.gradle | 4 ++-- .../java/de/marcelkapfer/morseconverter/MainActivity.java | 5 ++++- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9c2c176..871bf25 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "de.marcelkapfer.morseconverter" minSdkVersion 11 targetSdkVersion 22 - versionCode 220 - versionName "2.2 beta" + versionCode 221 + versionName "2.2.1" } buildTypes { release { diff --git a/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java b/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java index 9560410..34ff622 100644 --- a/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java +++ b/app/src/main/java/de/marcelkapfer/morseconverter/MainActivity.java @@ -58,6 +58,7 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro private MaterialSection writtenMorse, normalMorse, writtenMorseList, donate, about; private MaterialActionBarDrawerToggle mDrawerToggle; + //Declaring the billing processor BillingProcessor bp; //The MaterialNavigationDrawer init() methode replaces the normal onCreate() methode @@ -88,7 +89,9 @@ public class MainActivity extends MaterialNavigationDrawer implements BillingPro this.addSection(normalMorse); this.addDivisor(); this.addSection(writtenMorseList); - this.addBottomSection(donate); + if(!bp.isPurchased("donate")) { + this.addBottomSection(donate); + } this.addBottomSection(about); //set drawer image this.setDrawerHeaderImage(this.getResources().getDrawable(R.drawable.feature_graphics)); diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e35b6ff..2a84ee2 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -38,7 +38,7 @@ Wenn Du einen Fehler gefunden hast, schreibe mit bitte ein Email an marcelmichaelkapfer@yahoo.co.nz Du kannst eine ausführliche Anwendung auf marcel-kapfer.de/writtenmorse/index.html#howto_android finden. Wenn du auf einen fehlenden Code aufmerksam geworden bist, dann schreibe eine Email an marcelmichaelkapfer@yahoo.co.nz. - 2.2 beta \n15. Mai 2015 + 2.2.1 \n16. Mai 2015 Fehler Kontakt Entwickler diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6acfd34..b9d8d81 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -43,7 +43,7 @@ How to Missing Code - 2.2 beta\n15 May 2015 + 2.2.1 \n16 May 2015 Marcel Michael Kapfer marcel-kapfer.de/writtenmorse marcelmichaelkapfer@yahoo.co.nz