I have created listview using layoutinflator. Listview contains checkbox and textview for each row. I am displaying items in a listview with checkbox checked by default.I can check\uncheck these items.
Now on the same layout I have one button and under clickevent of this button I want to check which item has checkbox in checked state and which has not.
Can anybody have any idea how to check this?
My Inflator code is:
public View getView(int position, View convertView, ViewGroup parent) {
View view = convertView;
try {
mydbadapter.open();
if (view == null) {
LayoutInflater vi = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = vi.inflate(R.layout.syncissue_row, null);
}
issue = (TextView) view.findViewById(R.id.issuedescription);
checkbox = (CheckBox) view.findViewById(R.id.issueCheckBox);
issue.setText(arrlstFaults.get(position));
checkbox.setChecked(true);
} catch (SQLException e) {
mydbadapter.close();
e.printStackTrace();
} finally {
mydbadapter.close();
}
return view;
}