In Android, how to create EditText of fixed width?

后端 未结 10 471
醉酒成梦
醉酒成梦 2020-12-04 17:52

I would like to create an EditText which accepts only numbers, has a maximum of 4 numbers, and is never narrower than it would be if filled with 4 numbers (does not shrink

10条回答
  •  旧时难觅i
    2020-12-04 18:07

    Don't know about built-in solution but you can try passivly check the length and rise a dialog with error message at the moment of submission.

提交回复
热议问题