开发者

Android - strike out item in list view when touched

开发者 https://www.devze.com 2023-03-25 20:19 出处:网络
I have a list view with a list of items (To do), and 开发者_运维知识库I was wondering if there is a way to strike out the text, or entire box, when it is clicked?

I have a list view with a list of items (To do), and 开发者_运维知识库I was wondering if there is a way to strike out the text, or entire box, when it is clicked?

Thanks


On a click (e.g., in onListItemClick() of a ListActivity), update your data model to reflect the fact that the to-do item is completed, then call notifyDataSetChanged() on your Adapter, to trigger the ListView to update. In your custom Adapter, format the rows as appropriate based upon your data model.

0

精彩评论

暂无评论...
验证码 换一张
取 消