uphyca / creditcardedittext Goto Github PK
View Code? Open in Web Editor NEWEditText for credit card number.
License: Apache License 2.0
EditText for credit card number.
License: Apache License 2.0
Thank you very much for providing such a very nice library! I would like to continue using the library in the future and hope that you will provide it in a repository other than JCenter, which may be closed in the future.
Do you have any plans to move the library from JCenter to other repositories?
現状、カード番号が"3"で始まるAMEX, JCB, Dinersを入力するとき、最初の1文字でまずDinersと判定され二文字でAMEX, JCB, Dinersのいずれかが確定する。
この判定ロジックでカード番号の変更に応じてブランドを表示する場合、ユーザーはAMEXのカードを入力しているのに最初の一文字の時点ではDinersと表示されるため混乱を招く。
ファイル末尾の改行忘れが多かった
フォークしてenumに追加してビルドした新たなライブラリを作らなければ拡張できない
java.lang.IndexOutOfBoundsException: charAt: 4 >= length 4
at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:116)
at com.uphyca.creditcardnumberedittext.CreditCardNumberEditText$1.afterTextChanged(CreditCardNumberEditText.java:77)
at android.widget.TextView.sendAfterTextChanged(TextView.java:7695)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:9483)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:972)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:516)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:454)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:33)
at com.uphyca.creditcardnumberedittext.CreditCardNumberEditText$1.afterTextChanged(CreditCardNumberEditText.java:88)
”4242 1"が入力された状態で"4242"のあとのセパレーターを削除しても""4242 1"から変わらない。
CreditCardDateEditText
ユーザー入力前の状態 | ユーザー入力値 | フォーマット後の状態 |
---|---|---|
<> | 1 | 1<> |
1<> | 1 | 11/<> |
11/<> | 1 | 11/1<> |
11/1<> | 1 | 11/11<> |
11/11<> | del | 11/1<> |
11/1<> | del | 11/<> |
11/<> | del | 1<> |
<> はカーソル位置
Werckerでビルドするとcheckstyleの検査にひっかかる。ローカルではパスする。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.