3

I need to create custom EditText so it will look like this:

enter image description here

I need it to be single EditText. Is it possible to do it, or do I need to create EditText for every character?

Michal
  • 49
  • 2

2 Answers2

0

Yes it is possible! create multiple edit text's depending on the number of characters you want to accept as input and make sure to limit the size of each edit text to 1

android:maxLength="1"  

You can set the width of each edit text and place them horizontally one after the other

Rohit
  • 647
  • 14
  • 30
  • 1
    That's not the solution I was looking for. I need it to be one `EditText`, but characters visually separated as shown above. Still, thanks for trying. – Michal Dec 01 '14 at 10:22
0

You can create custom EditText by extending it. And you have to implement addTextChangeListener and their you can draw whatever you want. But No need to re Invent the wheel

And you can also use some build in customView like

Also have a look at this

Community
  • 1
  • 1
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300