I need to select automatically all checkboxes when I launch my app in onViewCreated()
.
With this code:
@Override
public void onViewCreated(V
Try with plAdapter.notifyDataSetChanged() after for loop ends. In adapter after set the value, you have to refresh the listview.
In your adapters getView()
method, try this:
@Override
public View getView(final int position, final View convertView, final ViewGroup parent) {
...........
...................
if (isChecked) {
holder.chkBox.setChecked(true);
holder.spinner.setVisibility(View.VISIBLE);
holder.np.setVisibility(View.VISIBLE);
} else {
holder.chkBox.setChecked(false);
holder.spinner.setVisibility(View.GONE);
holder.np.setVisibility(View.GONE);
}
.........
...................
return row;
}