diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 92f1c7201..900eee840 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -20,26 +20,25 @@
android:allowBackup="true"
android:fullBackupContent="@xml/backup"
android:backupAgent="com.kunzisoft.keepass.backup.SettingsBackupAgent"
- android:theme="@style/KeepassDXStyle.Light"
+ android:theme="@style/KeepassDXStyle.Night"
tools:replace="android:theme">
-
+
-
.
- *
- */
-package com.kunzisoft.keepass.activities;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Build;
-import android.os.Bundle;
-import android.support.annotation.Nullable;
-
-import com.kunzisoft.keepass.fileselect.FileSelectActivity;
-
-public class StartActivity extends Activity {
-
- @Override
- protected void onCreate(@Nullable Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- startFileSelectActivity();
- // Delete flickering for kitkat <=
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
- overridePendingTransition(0, 0);
- }
-
- protected void startFileSelectActivity() {
- FileSelectActivity.launch(this);
- }
-
- @Override
- protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- super.onActivityResult(requestCode, resultCode, data);
- if (resultCode == Activity.RESULT_CANCELED) {
- finish();
- }
- }
-}
diff --git a/app/src/main/java/com/kunzisoft/keepass/autofill/AutoFillAuthActivity.java b/app/src/main/java/com/kunzisoft/keepass/autofill/AutoFillAuthActivity.java
index 11aa74a8c..cff529134 100644
--- a/app/src/main/java/com/kunzisoft/keepass/autofill/AutoFillAuthActivity.java
+++ b/app/src/main/java/com/kunzisoft/keepass/autofill/AutoFillAuthActivity.java
@@ -28,18 +28,19 @@ import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
+import android.support.v7.app.AppCompatActivity;
-import com.kunzisoft.keepass.activities.StartActivity;
import com.kunzisoft.keepass.fileselect.FileSelectActivity;
@RequiresApi(api = Build.VERSION_CODES.O)
-public class AutoFillAuthActivity extends StartActivity {
+public class AutoFillAuthActivity extends AppCompatActivity {
private AutofillHelper autofillHelper;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
autofillHelper = new AutofillHelper();
+ startFileSelectActivity();
super.onCreate(savedInstanceState);
}
@@ -48,8 +49,7 @@ public class AutoFillAuthActivity extends StartActivity {
return PendingIntent.getActivity(context, 0,
intent, PendingIntent.FLAG_CANCEL_CURRENT).getIntentSender();
}
-
- @Override
+
protected void startFileSelectActivity() {
// Pass extra for Autofill (EXTRA_ASSIST_STRUCTURE)
AssistStructure assistStructure = autofillHelper.retrieveAssistStructure(getIntent());
diff --git a/app/src/main/java/com/kunzisoft/keepass/icons/IconDrawableFactory.java b/app/src/main/java/com/kunzisoft/keepass/icons/IconDrawableFactory.java
index 059703051..a8f9ede20 100644
--- a/app/src/main/java/com/kunzisoft/keepass/icons/IconDrawableFactory.java
+++ b/app/src/main/java/com/kunzisoft/keepass/icons/IconDrawableFactory.java
@@ -117,7 +117,7 @@ public class IconDrawableFactory {
* @param tintColor Use this color if tint is true
*/
public void assignDrawableTo(Context context, ImageView imageView, int iconId, boolean tint, int tintColor) {
- assignDrawableToImageView(getIconDrawable(context, iconId, tint, tintColor),
+ assignDrawableToImageView(new SuperDrawable(getIconDrawable(context, iconId, tint, tintColor)),
imageView,
tint,
tintColor);
@@ -126,10 +126,10 @@ public class IconDrawableFactory {
/**
* Utility method to assign a drawable to an ImageView and tint it
*/
- private void assignDrawableToImageView(Drawable drawable, ImageView imageView, boolean tint, int tintColor) {
- if (imageView != null && drawable != null) {
- imageView.setImageDrawable(drawable);
- if (tint) {
+ private void assignDrawableToImageView(SuperDrawable superDrawable, ImageView imageView, boolean tint, int tintColor) {
+ if (imageView != null && superDrawable.drawable != null) {
+ imageView.setImageDrawable(superDrawable.drawable);
+ if (!superDrawable.custom && tint) {
ImageViewCompat.setImageTintList(imageView, ColorStateList.valueOf(tintColor));
} else {
ImageViewCompat.setImageTintList(imageView, null);
@@ -145,7 +145,7 @@ public class IconDrawableFactory {
* @return The build drawable
*/
public Drawable getIconDrawable(Context context, PwIcon icon) {
- return getIconDrawable(context, icon, false, Color.WHITE);
+ return getIconDrawable(context, icon, false, Color.WHITE).drawable;
}
/**
@@ -157,11 +157,11 @@ public class IconDrawableFactory {
* @param tintColor Use this color if tint is true
* @return The build drawable
*/
- public Drawable getIconDrawable(Context context, PwIcon icon, boolean tint, int tintColor) {
+ public SuperDrawable getIconDrawable(Context context, PwIcon icon, boolean tint, int tintColor) {
if (icon instanceof PwIconStandard) {
- return getIconDrawable(context.getApplicationContext(), (PwIconStandard) icon, tint, tintColor);
+ return new SuperDrawable(getIconDrawable(context.getApplicationContext(), (PwIconStandard) icon, tint, tintColor));
} else {
- return getIconDrawable(context, (PwIconCustom) icon);
+ return new SuperDrawable(getIconDrawable(context, (PwIconCustom) icon), true);
}
}
@@ -245,6 +245,24 @@ public class IconDrawableFactory {
return draw;
}
+ /**
+ * Utility class to prevent a custom icon to be tint
+ */
+ private class SuperDrawable {
+ Drawable drawable;
+ boolean custom;
+
+ SuperDrawable(Drawable drawable) {
+ this.drawable = drawable;
+ this.custom = false;
+ }
+
+ SuperDrawable(Drawable drawable, boolean custom) {
+ this.drawable = drawable;
+ this.custom = custom;
+ }
+ }
+
/**
* Build a custom icon from database
* @param context Context to build the drawable
diff --git a/app/src/main/res/drawable/background_splash.xml b/app/src/main/res/drawable/background_splash.xml
index 0bfa22ad4..96500c41e 100644
--- a/app/src/main/res/drawable/background_splash.xml
+++ b/app/src/main/res/drawable/background_splash.xml
@@ -1,7 +1,7 @@
+ android:drawable="@color/background_night"/>
-
#000000
- #757575
- #757575
- - #59585a
- - #b2dfdb
+ - #80cbc4
+ - #80cbc4
- #b2dfdb
- @color/background_dark
- @style/KeepassDXStyle.Toolbar.Dark
@@ -39,7 +39,7 @@