How to implement the google wallet keyboard

190 views Asked by At

I want to implement the keyboard of google wallet. Anyone know how to do that. The keyboard is on the page. Not the system default keyboard. Thank youenter image description here Or how can I draw a keyboard?

this Link Android custom numeric keyboard will help you figure this problem

1

There are 1 answers

0
Justin Garrick On

You can easily see how Google implemented the keyboard by downloading the Google Wallet APK (or by rooting your phone and pulling the APK off) and unpacking/decompiling it with your tool of choice (e.g. Procyon, CFR, JD, etc.). I can only speculate, but I think they did this to minimize the possibility of a third-party keyboard app logging the input, and so that they can "shred" the PIN in memory as soon as it has been used.

The keypad is just a bunch of buttons laid out as a table/grid, and the buttons are customized to have the subscript effect (i.e. 2ABC) using SpannableStrings.

After decompiling, you can find what you're interested in by looking at the com.google.android.apps.wallet.pin package, specifically the PinButton class. Also, look at the /res/layout/pin_view.xml layout and its includes (pin_fields.xml and pin_pad.xml).