From: Damyan Ivanov Date: Thu, 18 Jun 2020 16:45:32 +0000 (+0300) Subject: better shortcut icon X-Git-Tag: v0.14.0~4 X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=commitdiff_plain;h=d4f0bff6d1d4ed421b5a4eb07bb672bccd6d254d better shortcut icon this one is visible on light and dark background --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 98ec7aaa..cad02177 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -1,5 +1,5 @@ /* - * Copyright © 2019 Damyan Ivanov. + * Copyright © 2020 Damyan Ivanov. * This file is part of MoLe. * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by @@ -352,23 +352,16 @@ public class MainActivity extends ProfileThemedActivity { if (!p.isPostingPermitted()) continue; - ShortcutInfo si = - new ShortcutInfo.Builder(this, "new_transaction_" + p.getUuid()).setShortLabel( - p.getName()) - .setIcon( - Icon.createWithResource( - this, - R.drawable.svg_thick_plus_white)) - .setIntent( - new Intent( - Intent.ACTION_VIEW, - null, - this, - NewTransactionActivity.class).putExtra( - "profile_uuid", - p.getUuid())) - .setRank(i) - .build(); + final ShortcutInfo.Builder builder = + new ShortcutInfo.Builder(this, "new_transaction_" + p.getUuid()); + ShortcutInfo si = builder.setShortLabel(p.getName()) + .setIcon(Icon.createWithResource(this, + R.drawable.thick_plus_icon)) + .setIntent(new Intent(Intent.ACTION_VIEW, null, this, + NewTransactionActivity.class).putExtra("profile_uuid", + p.getUuid())) + .setRank(i) + .build(); shortcuts.add(si); i++; } diff --git a/app/src/main/res/drawable-anydpi-v21/svg_thick_plus_white.xml b/app/src/main/res/drawable-anydpi-v21/svg_thick_plus_white.xml deleted file mode 100644 index ca2839e2..00000000 --- a/app/src/main/res/drawable-anydpi-v21/svg_thick_plus_white.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/thick_plus_icon.xml b/app/src/main/res/drawable/thick_plus_icon.xml new file mode 100644 index 00000000..c7a14deb --- /dev/null +++ b/app/src/main/res/drawable/thick_plus_icon.xml @@ -0,0 +1,51 @@ + + + + + + + diff --git a/art/thick-plus-icon.svg b/art/thick-plus-icon.svg new file mode 100644 index 00000000..a10e9293 --- /dev/null +++ b/art/thick-plus-icon.svg @@ -0,0 +1,36 @@ + + + + + + + + image/svg+xml + + + + + + + + + + +