Giter Site home page Giter Site logo

creditcardedittext's People

Contributors

esmasui avatar yanzm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fkmhrk

creditcardedittext's Issues

Plan to leave JCenter?

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?

カード番号に対応するブランドが複数候補ある場合はUNKNOWNとする

現状、カード番号が"3"で始まるAMEX, JCB, Dinersを入力するとき、最初の1文字でまずDinersと判定され二文字でAMEX, JCB, Dinersのいずれかが確定する。
この判定ロジックでカード番号の変更に応じてブランドを表示する場合、ユーザーはAMEXのカードを入力しているのに最初の一文字の時点ではDinersと表示されるため混乱を招く。

セパレーターに隣接する文字を削除するとクラッシュする

  1. ユーザーは"42424"を入力する
  2. プログラムは"4242 4"に置換する
  3. ユーザーは末尾の'4'を削除する
  4. プログラムはクラッシュする
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)

クレジットカードの日付入力用Viewを作る

クラス名

CreditCardDateEditText

動作仕様

must
  • 月2桁/年2桁
  • max length = 5(/ 込み)
  • /を自動で挿入する
  • 0 はユーザーが入力する(自動で挿入しない)
ユーザー入力前の状態 ユーザー入力値 フォーマット後の状態
<> 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<>

<> はカーソル位置

possible
  • 月部分が 01 〜 12 以外になる入力を許可しない

Fix wercker build

Werckerでビルドするとcheckstyleの検査にひっかかる。ローカルではパスする。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.