How to set the listener in the text editor of the user list view in android

I inflate the ListView using the BaseAdapter and View holders. Inside the list view, each line has 3 Text View and 1 Edit Text.

Now I want to set the Listener to the List view. Values ​​If I click on any line, then the Listener must be installed so that I get the position of this line in the List view. The listener in the text view is set using "android:focusable="false" " But the edit text listener does not receive Set.

I have a Set Textwacher in the Text editor. Works correctly.

 EditTextWacher editTextWacher = new EditTextWacher(viewHolder); viewHolder.editTextQuantity.addTextChangedListener(editTextWacher); 

I do not know the exact problem of why this is happening. I set the focal false. Inside edit text. Still not working.

Edit Adding the screen shot

+4
source share
1 answer

Do not try to add android:focusable="false" to the view you want to listen to on it. In this case, remove android:focusable="false" from the EditText .

+2
source

Source: https://habr.com/ru/post/1386064/


All Articles