阅读背景:

如何在android中禁用单击ListView?

来源:互联网 

I have a ListView that I'm populating with values from my database. If the database is empty, I'm setting the first item of the ListView to "No data.". I want to disable clicking on this item. I've used ArrayAdapter. I tried making areAllItemsEnabled,isEnabled false, but it was of no use. Even if I set the ListView's isClickable and setEnabled to false, it is of no use. And I put the code for the OnItemClickListener in the else condition,even that doesn't stop the list item from being clickable. Does someone have an alternate solution? Thanks!I have a ListView that I'm populating with valu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: