问题描述
我有一个的EditText
的的ListView
每一行内。出于某种原因,当我挖掘的EditText,简要获得焦点,但随即失去它。
I have an EditText
inside each row of a ListView
. For some reason, when I tap the EditText, it briefly gains focus but then immediately loses it.
我曾尝试这些东西:
listView.setItemsCanFocus(true);
editText.setFocusable(true);
结果
而的EditText
是(简述)突出重点,在输入
键说下一页
和自动更正栏
是present。当它失去焦点,软键盘熬夜,但输入
键变成了返回箭头
和自动更正栏
消失。
While the EditText
is (briefly) focused, the Enter
key says Next
and the auto-correct bar
is present. When it loses focus, the soft keyboard stays up, but the Enter
key becomes a Return Arrow
, and the auto-correct bar
disappears.
推荐答案
的EditText
取值的ListView内
是非常棘手。我建议你避免他们像瘟疫如果可能的话。当我与他们搞乱,是有益的,但。如果你只有几个项目你总是可以只使用一个滚动型
。
EditText
s within ListView
s are extremely tricky. I'd suggest you avoid them like the plague if possible. When I was messing with them, this answer was helpful though. If you only have a few items you can always just use a ScrollView
.
这篇关于里面的ListView EditText上不会集中注意力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!