里面的ListView EditText上不会集中注意力 [英] EditText inside ListView will not stay focused

查看:150
本文介绍了里面的ListView EditText上不会集中注意力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的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内是非常棘手。我建议你​​避免他们像瘟疫如果可能的话。当我与他们搞乱,这个答案是有益的,但​​。如果你只有几个项目你总是可以只使用一个滚动型

EditTexts within ListViews 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上不会集中注意力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆