Set Android EditText to focus instead of editing

Asked 2 years ago, Updated 2 years ago, 31 views

Is it possible to set the Android EditText to focus instead of editing?
If you tap it, you won't let the keyboard come out.

android:editable="false"
android:focusable="false"

This turned out to be a hit, but now you can't focus completely.
What should I do?

android

2022-09-29 21:51

1 Answers

XML doesn't seem to work well.

EditText Instance

edittext.setKeyListener(null);

Then it worked.

Note:
https://stackoverflow.com/questions/3928711/how-to-make-edittext-not-editable-through-xml-in-android


2022-09-29 21:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.