From aded8fab0ad37be71d7a9499885c6b213a9f0e73 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sat, 7 Apr 2018 15:41:52 +0200 Subject: [PATCH] Rebuild classic icons (Add apple icon and remove numbers) --- .../dialogs/IconPickerDialogFragment.java | 46 ++---- app/src/main/res/drawable-hdpi/ic64.png | Bin 196 -> 2199 bytes app/src/main/res/drawable-ldpi/ic64.png | Bin 189 -> 1032 bytes app/src/main/res/drawable/ic64.png | Bin 191 -> 1393 bytes app/src/main/res/layout/icon.xml | 27 +--- app/src/main/res/layout/icon_picker.xml | 12 +- art/ic64_classic_replacement.svg | 138 ++++++++++++++++++ 7 files changed, 167 insertions(+), 56 deletions(-) create mode 100644 art/ic64_classic_replacement.svg diff --git a/app/src/main/java/com/kunzisoft/keepass/dialogs/IconPickerDialogFragment.java b/app/src/main/java/com/kunzisoft/keepass/dialogs/IconPickerDialogFragment.java index ffd3509c1..a68aca235 100644 --- a/app/src/main/java/com/kunzisoft/keepass/dialogs/IconPickerDialogFragment.java +++ b/app/src/main/java/com/kunzisoft/keepass/dialogs/IconPickerDialogFragment.java @@ -21,7 +21,6 @@ package com.kunzisoft.keepass.dialogs; import android.app.Dialog; import android.content.Context; -import android.content.DialogInterface; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; @@ -29,12 +28,9 @@ import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; -import android.widget.TextView; import com.kunzisoft.keepass.R; import com.kunzisoft.keepass.icons.Icons; @@ -75,47 +71,39 @@ public class IconPickerDialogFragment extends DialogFragment { View root = inflater.inflate(R.layout.icon_picker, null); builder.setView(root); - GridView currIconGridView = (GridView) root.findViewById(R.id.IconGridView); + GridView currIconGridView = root.findViewById(R.id.IconGridView); currIconGridView.setAdapter(new ImageAdapter(this.getContext())); - currIconGridView.setOnItemClickListener(new OnItemClickListener() { - public void onItemClick(AdapterView parent, View v, int position, long id) { - Bundle bundle = new Bundle(); - bundle.putInt(KEY_ICON_ID, position); - iconPickerListener.iconPicked(bundle); - - dismiss(); - } - }); - - builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { - public void onClick(DialogInterface dialog, int id) { - IconPickerDialogFragment.this.getDialog().cancel(); - } + currIconGridView.setOnItemClickListener((parent, v, position, id) -> { + Bundle bundle = new Bundle(); + bundle.putInt(KEY_ICON_ID, position); + iconPickerListener.iconPicked(bundle); + dismiss(); }); + builder.setNegativeButton(R.string.cancel, (dialog, id) -> + IconPickerDialogFragment.this.getDialog().cancel()); + return builder.create(); } public class ImageAdapter extends BaseAdapter { private Context context; - public ImageAdapter(Context c) { + ImageAdapter(Context c) { context = c; } - public int getCount() { + public int getCount() { /* Return number of KeePass icons */ return Icons.count(); } - public Object getItem(int position) - { + public Object getItem(int position) { return null; } - public long getItemId(int position) - { + public long getItemId(int position) { return 0; } @@ -123,15 +111,13 @@ public class IconPickerDialogFragment extends DialogFragment { View currView; if(convertView == null) { LayoutInflater li = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); - currView = li.inflate(R.layout.icon, parent, false); + assert li != null; + currView = li.inflate(R.layout.icon, parent, false); } else { currView = convertView; } - - TextView tv = (TextView) currView.findViewById(R.id.icon_text); - tv.setText("" + position); - ImageView iv = (ImageView) currView.findViewById(R.id.icon_image); + ImageView iv = currView.findViewById(R.id.icon_image); iv.setImageResource(Icons.iconToResId(position)); return currView; diff --git a/app/src/main/res/drawable-hdpi/ic64.png b/app/src/main/res/drawable-hdpi/ic64.png index f7f573863d0ceef97415dd0dd54cc0eda7b569c3..4d896d0a1041d6131e748bcd41d6b304bf332af1 100644 GIT binary patch delta 2164 zcmV-)2#fc`0hbYwB#|*0e-y(202IRk6>v>L00007bV*G`2jT<=4J9ta^1v$q00<;W zL_t(&-tAdkY!lfP{_c!pkH@jG6Xyrw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4FZZXc)I$ztaD0e0stI~CDZ@_ diff --git a/app/src/main/res/drawable/ic64.png b/app/src/main/res/drawable/ic64.png index 5dd1edf299adebbec7be08a4ff11dd9a50147f89..0472df7bf7c181c29f962774f56118fdede163cc 100644 GIT binary patch delta 1352 zcmV-O1-JUY0r3iuB#|*0e+}0F01ejxLMWSf00007bV*G`2jT<=4J9kHm^7pS00jO? zL_t(o!|j(#Xd71)hW~r#C5<9FwooFuaxCK5#7b?GdQ&$f5L{@Xo3w>O!JCGXKq0cz zRq3u2y2>J6xzJK*Hl~<>C}d+WU9_8N~0>0C8Ee4e?8{T?V^^L2su_7 zFAD8}pBZKbop1ho?$H_G|M;&5X>{?%jT^0;^Y3L@zE~=iG(iw5vMk4SUH@`yZ0yca z0tk&RhQndq>-8?$Y_^a6e!o0CJS?@hx1UHP67To+_P%%i{P`cl;c(IVBEewrwMZoL z_(%W%AQp=~USD6Ie<&7nM?*xojNtOxVZRebaeES!NI|4 z0BR%>i2=wR2><{Ti^V4!8ynvwlSz`x({S$5<=bt5Y1#VcgM%aeLkP>+Jy@j`aB+wb75g2O$b>G27_)w$VJY%L@A9ueE4u? za&nUWV+Te@NBy!aPf|*IIyyQy=UhxClWcc)*AN8ZyL39OYMOR!X=y3b+uLhbRn=^1 zX;DnmL^hi>e|23ian7%djg5s~7+_>%q)(EhUxtQ;90LOb0wI4tYMLf8nG9xTX3V9f zB~B?Ne!m|B0|Qi5Ra7b!7={7EFpx^6FgrWTHa9nKhC-pwn=ZnuSFfrLhhyRL<;$(- z&Yh#8C_)rP2!a4Y2vk)?S63J5?(U|iPoF0J{ryBye-v=e0ibrY*=+E5JT#ll4ra62 zKeO5FZ}quoBLIiP@li)dhoh&bhX{fINs=JTa!ryXK@>%}-EOqEw?hzwnkc2UBc&8h zrxV@X-Sq6)vtI#twJ88aQHJ~a`i|Asi4cgQSWDa}(Lo}F;N;1Z#OL$52qD*+0^po? zwYIi`e=!ErG{G2yVHjYH)$ApNG$l$YR8<9~l-TX|q57N+x1nJen%!;(V+@24aL!?x zCMcz~^Qx*qR=2Ex76-Y_W>fa|_M8BoJQsj-j&ivSNs?*_8DpT7*6!CsSY<85YB0tK zW6S_>IDjaM`9h)KkYyRBX+E>o)gQNlRaFmSe}&kh>GZx^prwCo0O6atkvsa0@ds%$g&?z`(#>;_2(kev5;hn_IQ4 znB@;pNV3E=qQp5rH#aq}gu%HeHL)Z$MWH;iBtya7(>EZzkxv|`NXpa2F(l&f+k=dZ kKwgu=|Mhtu4j|@xHUR|&#_8X~uLC&@p00i_>zopr0BZOq^8f$< diff --git a/app/src/main/res/layout/icon.xml b/app/src/main/res/layout/icon.xml index ef74cfb8c..d3b4bc816 100644 --- a/app/src/main/res/layout/icon.xml +++ b/app/src/main/res/layout/icon.xml @@ -17,27 +17,12 @@ You should have received a copy of the GNU General Public License along with KeePass DX. If not, see . --> - - - - - - + android:layout_gravity="center" + android:layout_margin="32dp" + android:src="@drawable/ic99_blank"> + diff --git a/app/src/main/res/layout/icon_picker.xml b/app/src/main/res/layout/icon_picker.xml index e08e0b131..570cc5e01 100644 --- a/app/src/main/res/layout/icon_picker.xml +++ b/app/src/main/res/layout/icon_picker.xml @@ -19,11 +19,13 @@ --> + android:stretchMode="spacingWidthUniform"> diff --git a/art/ic64_classic_replacement.svg b/art/ic64_classic_replacement.svg new file mode 100644 index 000000000..ea96a4875 --- /dev/null +++ b/art/ic64_classic_replacement.svg @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + +