I have a custom listview adapter with a imageview, textview and a checkbox. and i also have a button and a checkbox in my main layout(not in listview).
What here i want
This morning I read an answer of an issue like this, and they recommend we put holder.checkBox.setChecked(itemChecked.get(position));
before holder.checkBox.setOnCheckedChangeListener
So, getView
function will be rewritten like this:
public View getView(....)
{
...
holder.checkBox.setChecked(itemChecked.get(position));///move to here
holder.checkBox.setOnCheckedChangeListener(...);
...
)