安卓的EditText中的ListView [英] Android: EditText in ListView

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

问题描述

我想有一个定制的ListView,其中每一行包含一个EditText字段,可以由用户编辑。但是,当我点击我失去焦点的EditTexts之一,不能输入文字那里(我想,因为其他行的重画,并获得焦点)。 我该怎么办?

I would like to have a custom ListView, where each row contains an EditText field, that may be edited by the user. But when I click on one of the EditTexts I lose the focus, and can't type text there (I suppose because the other rows are redrawn and get the focus). What can I do?

推荐答案

如果问题涉及到的软件键盘,试图在AndroidManifest.xml中设置windowSoftInputMode为adjustPan在活动的声明如下:

If the problem is related to software keyboard, try to set windowSoftInputMode to adjustPan in activity declaration in AndroidManifest.xml as follows:

  ...
    <activity 
        android:name=".activity.Activity"
        android:label="@string/activity"
        android:windowSoftInputMode="adjustPan" />
    ...

这应该帮助。检查<一href="http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html">http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html关于它的更多信息。

It should help. Check http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html for more info about it.

这篇关于安卓的EditText中的ListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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