N
N
Nonprogrammer2015-06-13 18:13:39
Android
Nonprogrammer, 2015-06-13 18:13:39

Why doesn't the keyboard appear in Android:EditText?

I am writing a small program for Android. In the layout, upon clicking on the Button, a dynamic EditText is inserted. But on pressing in EditText the electronic keyboard does not open. If you change the orientation of the phone, then the EditText starts working normally, that is, the keyboard opens (in any orientation). How to fix?
Link for apk file (there are errors and shortcomings): https://drive.google.com/file/d/0B_0Bo2G5taX2RU5GN...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nonprogrammer, 2016-09-01
@c_pro_lang

Throw this idea))))

D
danila75, 2021-04-09
@danila75

Once you form the EditText dynamically, you need to programmatically set the click behavior for it (for example, like this)
editText.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
v.requestFocus();
return false;
}
});
when flipping, the ifeys is redrawn and the event is pulled up by itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question