Android – you can only click text in the listview item

We have a listview with dynamic content. We can only click on the text, not the whole item (which means short text means a small touch area)

Our listview:

ListView lv = getListView();  
lv.setTextFilterEnabled(true);  
lv.setOnItemClickListener(this);

What do we need to do to make the whole project clickable, not just its text

resolvent:

Be sure to fill all the contents of the listview with the textview you are using and put it in it:

android:layout_width="match_parent"

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>