2012-03-12 51 views
1

我在每一行都有一个带有EditText的ListView。所以我不能在EditText中输入任何内容,也不能在点击它们时关注它。 Xml souce:无法在ListView中编辑Android EditText

<EditText 
android:id="@+id/textValue" 
android:layout_width="match_parent" 
android:layout_height="37dip" 
android:editable="true" 
android:focusable="false" 
android:focusableInTouchMode="false" 
android:gravity="left|center" 
android:inputType="text"> 
</EditText> 

在此先感谢。

回答

1

如果你希望能够专注于EditText S,删除其设置为不可编辑的行:

android:focusable="false" 
android:focusableInTouchMode="false" 
0

你做的EditText上unfocusable与两行:

android:focusable="false" 
android:focusableInTouchMode="false" 

只是删除或将该值设置为“真”,以使用它们

1

使用TableLayout而不是ListView因为EditTextListView有焦点问题。