summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java28
-rw-r--r--app/src/main/res/drawable/donation_img.xml8
-rw-r--r--app/src/main/res/layout/donation_reminder_dialog.xml2
-rw-r--r--app/src/normal/res/drawable/logo.pngbin0 -> 18877 bytes
5 files changed, 14 insertions, 26 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java
index fd9aa029..45664653 100644
--- a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java
+++ b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java
@@ -3,6 +3,7 @@ package se.leap.bitmaskclient;
import android.content.Context;
import android.content.SharedPreferences;
import android.support.multidex.MultiDexApplication;
+import android.support.v7.app.AppCompatDelegate;
import com.squareup.leakcanary.LeakCanary;
import com.squareup.leakcanary.RefWatcher;
@@ -36,6 +37,7 @@ public class BitmaskApp extends MultiDexApplication {
providerObservable = ProviderObservable.getInstance();
providerObservable.updateProvider(getSavedProviderFromSharedPreferences(preferences));
EipSetupObserver.init(this, preferences);
+ AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
/**
diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java
index 001d7e6c..66db9bc8 100644
--- a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java
@@ -55,23 +55,17 @@ public class DonationReminderDialog extends AppCompatDialogFragment {
isShown = true;
builder.setView(view);
- btnDonate.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DONATION_URL));
- startActivity(browserIntent);
- PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
- DateHelper.getCurrentDateString());
- dismiss();
- }
+ btnDonate.setOnClickListener(v -> {
+ Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DONATION_URL));
+ startActivity(browserIntent);
+ PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
+ DateHelper.getCurrentDateString());
+ dismiss();
});
- btnLater.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
- DateHelper.getCurrentDateString());
- dismiss();
- }
+ btnLater.setOnClickListener(v -> {
+ PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE,
+ DateHelper.getCurrentDateString());
+ dismiss();
});
return builder.create();
@@ -90,7 +84,7 @@ public class DonationReminderDialog extends AppCompatDialogFragment {
Log.e(TAG, "context is null!");
return false;
}
-
+
String firstTimeUserDate = PreferenceHelper.getString(context, FIRST_TIME_USER_DATE, null);
if (firstTimeUserDate == null) {
PreferenceHelper.putString(context, FIRST_TIME_USER_DATE, DateHelper.getCurrentDateString());
diff --git a/app/src/main/res/drawable/donation_img.xml b/app/src/main/res/drawable/donation_img.xml
deleted file mode 100644
index 1e0b405e..00000000
--- a/app/src/main/res/drawable/donation_img.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@drawable/background_main"
- android:gravity="fill_horizontal|fill_vertical"/>
- <item android:drawable="@drawable/logo"
- android:gravity="center"
- />
-</layer-list>
diff --git a/app/src/main/res/layout/donation_reminder_dialog.xml b/app/src/main/res/layout/donation_reminder_dialog.xml
index e8fb34d4..7a41474a 100644
--- a/app/src/main/res/layout/donation_reminder_dialog.xml
+++ b/app/src/main/res/layout/donation_reminder_dialog.xml
@@ -43,7 +43,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
- android:src="@drawable/donation_img" />
+ app:srcCompat="@drawable/donation_img" />
</android.support.v7.widget.CardView>
diff --git a/app/src/normal/res/drawable/logo.png b/app/src/normal/res/drawable/logo.png
new file mode 100644
index 00000000..773937ff
--- /dev/null
+++ b/app/src/normal/res/drawable/logo.png
Binary files differ