Can I add certain characters fixed to the end of the string in Android EditText?

Asked 1 years ago, Updated 1 years ago, 133 views

In editText, where you can enter only numbers,

Is there a way to automatically put "dog" on the back when you write 5 in editText?

android edittext

2022-09-22 20:43

1 Answers

If the purpose is to limit the length of the EditText input, then layout Add android:maxLength="5" inside the EditText property.

If you want to be able to enter only numbers, you can give me android:inputType="number" If you want to hide input information every time you write like a password, set it to "numberPassword" You can do that.


2022-09-22 20:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.