Search code examples
androidandroid-edittextandroid-textinputedittext

How add placeholder on editText empty characters


I have an editText that has a limit of 4 characters

I want to add a place holder in all the empty characters

Is similar to a password input

○ for empty characters and ● for already taken

Examples:
Pin is 112 => Result in EditText ●●●○
Pin: 12 => EditText ●●○○
Pin: 1234 => EditText ●●●●


Solution

  • I ended doing a simple custom view that does what I wanted. Is a little outdated but can be tweaked easily.

    https://github.com/waveduke/PinView

    I hope it helps anyone that has the same problem :)