且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

单选按钮被取消并在列表视图滚动中自动检查

更新时间:2023-10-19 15:49:46

首先您需要在模型中保存勾选(复选框选择),例如isSelected = true&调用 notifyDataSetChanged 。然后在getView()方法中你需要检查这个标志并根据它设置复选框状态。

First of all you need to save the tick(checkbox selection) in your model, say isSelected = true & call notifyDataSetChanged. and then inside getView() method u need to check for this flag and set checkbox state based on that.