G
G
geron2016-06-23 07:27:09
Android
geron, 2016-06-23 07:27:09

How to implement non-removable character in EditText?

Hello!
I need to implement a non-removable character in EditText, as is done in the VK mobile application. When registering, there is a plus in the phone number input field that cannot be deleted. Tell me how to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Gapchenko, 2016-06-23
@artemgapchenko

You can just put next TextViewto the plus and EditTextto enter text, that's the whole implementation.

A
Alexey Perelygin, 2016-06-24
@orcDamnar

you can hook it up to EditText TextWatcher https://developer.android.com/reference/android/te... or put a transparent TextView above EditText wrap everything in RelativLayout and adjust the position as needed. Ways of darkness, in general.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question