How to add Editable edittext to the list?

I use the section adapter for the entire list. Now in this image there is an edittext that is not being edited. I want this edittext to be edited.

I use section adapter for the whole listview. Now in this image, there is a edittext which is not editable. I want to make this edittext editable.

+7
source share
6 answers

Try adding android: windowSoftInputMode = "adjustPan" to an action that supports ListView.

This is because I think the parent view of EditText is recreated. The preference for getView (viewing convertView, the parent of the ViewGroup) is called with empty conversion, rebuilding the entire view, rather than reusing the existing one.

+9
source

I had the same problem before, after searching for the lot, I received one tutorial that was very useful for solving this problem ... please refer to it ...

http://vikaskanani.wordpress.com/2011/07/27/android-focusable-edittext-inside-listview/

+2
source

Try using the following code inside the list:

android:descendantFocusability="beforeDescendants" 

Additional information: http://developer.android.com/reference/android/view/ViewGroup.html#attr_android:descendantFocusability

+1
source

You must use this to declare a list item layout.

  <EditText android:id="@+id/editText" android:layout_width="fillh_parent" android:layout_height="wrap_content" > </EditText> 

So you should check your xml if android:editable="false" been set and uninstall it.

0
source

Better you can go to the user list, in the normal view of the list it is impossible, using the user list, you have two xml files. In one xml you will have your own list, and in another xml you have to tell you edittext .. That's all ..

0
source

I'm not sure what your question is. If you cannot edit the EditText that is inside the custom ListView, you need to add

 android:focusable="false" 

for EditText in custom layout.

-one
source

All Articles