alphamu / PinEntryEditText

An EditText that looks like a pin entry field. It is highly customisable and even animated text.
Apache License 2.0
670 stars 137 forks source link

Allow to change mask and hint programmatically #29

Closed eltos closed 6 years ago

eltos commented 6 years ago

Related Issue #4

miladsalimiiii commented 5 years ago

in setSingleCharHint , hint repeat in per position for example when our maxLength is 6 and we set "milad" to setSingleCharHint then we have , milad milad milad milad milad milad , how can we set one milad as hint. @alphamu , @eltos

alphamu commented 5 years ago

It's been a while, so I'll have to review the code and get back to you. However, fr memory, if you provide a string of characters, the widget should loop through the characters. In your example if the pin is 7 digits, it should go miladmi.

Regards

On Mon., 19 Aug. 2019, 5:13 pm miladsalimiiii, notifications@github.com wrote:

in setSingleCharHint , hint repeat in per position for example when our maxLength is 6 and we set "milad" to setSingleCharHint then we have , milad milad milad milad milad milad , how can we set one milad as hint. @alphamu https://github.com/alphamu , @eltos https://github.com/eltos

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/alphamu/PinEntryEditText/pull/29?email_source=notifications&email_token=AAGOJDCQJNLHZ262P4XUVR3QFJBZHA5CNFSM4EX4X47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4R5VKI#issuecomment-522443433, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGOJDHU7LUPBX3XOCSUAILQFJBZHANCNFSM4EX4X47A .

miladsalimiiii commented 5 years ago

@alphamu , Thank you for your answer but i am sure about this :"milad milad milad milad milad milad" in my example and i am waiting for your new answer.

eltos commented 5 years ago

Check this line here, it's not looping through the characters but repeating the full word. You could add an index easily thought.

@man4ik implemented this.

miladsalimiiii commented 5 years ago

This canvas.drawText(mSingleCharHint, middle - hintWidth / 2, mCharBottom[i], mSingleCharPaint) line ? Index to what ? We have this mPinEntryEditText.setSingleCharHint("milad") how can we index it?

@eltos

eltos commented 5 years ago

@miladsalimiiii From a developer point of view.