replace icons by vector drawables to fix color issues with day/night scheme

This commit is contained in:
Philipp Crocoll
2024-12-10 15:06:37 +01:00
parent add8209f11
commit ed9cd7180c
242 changed files with 379 additions and 157 deletions

View File

@@ -24,7 +24,7 @@ namespace keepass2android
{
get
{
return _context.Resources.GetDrawable(Resource.Drawable.ic_menu_copy_holo_dark);
return _context.Resources.GetDrawable(Resource.Drawable.baseline_content_copy_24);
}
}
public string Text

View File

@@ -20,7 +20,7 @@ namespace keepass2android
public Drawable Icon
{
get { return _ctx.Resources.GetDrawable(Resource.Drawable.ic_menu_upload_grey); }
get { return _ctx.Resources.GetDrawable(Resource.Drawable.baseline_upload_24); }
}
public string Text

View File

@@ -19,7 +19,7 @@ namespace keepass2android
public Drawable Icon
{
get { return _entryActivity.Resources.GetDrawable(Resource.Drawable.ic_menu_share_grey); }
get { return _entryActivity.Resources.GetDrawable(Resource.Drawable.baseline_share_24); }
}
public string Text

View File

@@ -24,7 +24,7 @@ namespace keepass2android
get
{
//return new TextDrawable("\uF06E", _activity);
return _activity.Resources.GetDrawable(Resource.Drawable.ic_menu_view_grey);
return _activity.Resources.GetDrawable(Resource.Drawable.baseline_visibility_24);
}
}

View File

@@ -29,7 +29,7 @@ namespace keepass2android.EntryActivityClasses
{
get
{
return _entryActivity.Resources.GetDrawable(Resource.Drawable.ic_picture);
return _entryActivity.Resources.GetDrawable(Resource.Drawable.baseline_image_24);
}
}

View File

@@ -19,7 +19,7 @@ namespace keepass2android
public Drawable Icon
{
get { return _activity.Resources.GetDrawable(Resource.Drawable.ic_menu_save_grey); }
get { return _activity.Resources.GetDrawable(Resource.Drawable.baseline_save_24); }
}
public string Text

View File

@@ -41,6 +41,7 @@ using Android.Graphics;
using Android.Graphics.Drawables;
using Android.Runtime;
using Android.Util;
using Google.Android.Material.Dialog;
using keepass2android.Io;
using KeePassLib.Serialization;
using KeeTrayTOTP.Libraries;
@@ -262,15 +263,12 @@ namespace keepass2android
// Respect mask password setting
MakePasswordVisibleOrHidden();
ImageButton btnTogglePassword = (ImageButton)FindViewById(Resource.Id.toggle_password);
Button btnTogglePassword = (Button)FindViewById(Resource.Id.toggle_password);
btnTogglePassword.Click += (sender, e) =>
{
State.ShowPassword = !State.ShowPassword;
MakePasswordVisibleOrHidden();
};
PorterDuff.Mode mMode = PorterDuff.Mode.SrcAtop;
Color color = new Color (189,189,189);
btnTogglePassword.SetColorFilter (color, mMode);
Button addButton = (Button) FindViewById(Resource.Id.add_advanced);
@@ -355,7 +353,7 @@ namespace keepass2android
if (State.Entry.Binaries.Get(strItem) != null)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);
builder.SetTitle(GetString(Resource.String.AskOverwriteBinary_title));
builder.SetMessage(GetString(Resource.String.AskOverwriteBinary));
@@ -769,7 +767,7 @@ namespace keepass2android
base.OnBackPressed();
} else
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);
builder.SetTitle(GetString(Resource.String.AskDiscardChanges_title));
builder.SetMessage(GetString(Resource.String.AskDiscardChanges));
@@ -1132,7 +1130,7 @@ namespace keepass2android
private void EditTotpString(View sender)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);
View dlgView = LayoutInflater.Inflate(Resource.Layout.
configure_totp_dialog, null);
@@ -1337,7 +1335,7 @@ namespace keepass2android
private void EditAdvancedString(View sender)
{
AlertDialog.Builder builder = new AlertDialog.Builder(this);
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);
View dlgView = LayoutInflater.Inflate(Resource.Layout.
edit_extra_string_dialog, null);
@@ -1356,7 +1354,7 @@ namespace keepass2android
//setup delete button:
var deleteButton = dlgView.FindViewById<Button>(Resource.Id.delete_extra);
deleteButton.SetCompoundDrawablesWithIntrinsicBounds(Resources.GetDrawable(Resource.Drawable.ic_menu_delete), null, null, null);
deleteButton.SetCompoundDrawablesWithIntrinsicBounds(Resources.GetDrawable(Resource.Drawable.baseline_delete_24), null, null, null);
deleteButton.Click += (o, args) =>
{
DeleteAdvancedString(sender);

View File

@@ -307,7 +307,7 @@ namespace keepass2android
_fpTextView.SetTextColor(
_fpTextView.Resources.GetColor(Resource.Color.md_theme_secondary, null));
_fpTextView.Text = "";
_fpIcon.SetImageResource(Resource.Drawable.ic_fp_40px);
_fpIcon.SetImageResource(Resource.Drawable.baseline_fingerprint_24);
}
protected override void OnResume()

View File

@@ -643,6 +643,12 @@ namespace keepass2android
FindViewById(Resource.Id.fabCancelAddNew).Visibility = ViewStates.Visible;
FindViewById(Resource.Id.fabAddNewGroup).Visibility = AddGroupEnabled ? ViewStates.Visible : ViewStates.Gone;
FindViewById(Resource.Id.fabAddNewEntry).Visibility = AddEntryEnabled ? ViewStates.Visible : ViewStates.Gone;
FindViewById<Google.Android.Material.FloatingActionButton.ExtendedFloatingActionButton>(Resource.Id
.fabAddNewEntry).Shrink();
FindViewById<Google.Android.Material.FloatingActionButton.ExtendedFloatingActionButton>(Resource.Id
.fabAddNewGroup).Extended = false;
FindViewById<Google.Android.Material.FloatingActionButton.ExtendedFloatingActionButton>(Resource.Id
.fabAddNewGroup).Extend();
FindViewById(Resource.Id.fabAddNew).Visibility = ViewStates.Gone;
FindViewById(Resource.Id.fabSearch).Visibility = ViewStates.Gone;
FindViewById(Resource.Id.fabTotpOverview).Visibility = ViewStates.Gone;

View File

@@ -953,7 +953,7 @@ namespace keepass2android
btn.SetImageResource(Resource.Drawable.ic_fingerprint_error);
btn.PostDelayed(() =>
{
btn.SetImageResource(Resource.Drawable.ic_fp_40px);
btn.SetImageResource(Resource.Drawable.baseline_fingerprint_24);
}, 1300);
Toast.MakeText(this, message, ToastLength.Long).Show();
}
@@ -1931,7 +1931,7 @@ namespace keepass2android
if (_biometricDec.Init())
{
btn.SetImageResource(Resource.Drawable.ic_fp_40px);
btn.SetImageResource(Resource.Drawable.baseline_fingerprint_24);
_biometricDec.StartListening(new BiometricAuthCallbackAdapter(this, this));
return true;
}

View File

@@ -198,7 +198,7 @@ namespace keepass2android
btn.SetImageResource(Resource.Drawable.ic_fingerprint_error);
btn.PostDelayed(() =>
{
btn.SetImageResource(Resource.Drawable.ic_fp_40px);
btn.SetImageResource(Resource.Drawable.baseline_fingerprint_24);
}, 1300);
Toast.MakeText(this, message, ToastLength.Long).Show();
@@ -281,7 +281,7 @@ namespace keepass2android
if (_biometryIdentifier.Init())
{
Kp2aLog.Log("successfully initialized fingerprint.");
btn.SetImageResource(Resource.Drawable.ic_fp_40px);
btn.SetImageResource(Resource.Drawable.baseline_fingerprint_24);
_biometryIdentifier.StartListening(this);
return true;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show More