I have a listview whose rows has one textview and a check box.
I want to pop the name associated with the checkbox and on a click of a button i want to store all the textview data in to database. How would I do this?
I have a listview whose rows has one textview and a check box.
I want to pop the name associated with the checkbox and on a click of a button i want to store all the textview data in to database. How would I do this?
Try something like this:
if (checkBox.isChecked()) {
View view = listview.getChildAt(position);
TextView text = (TextView)view.findViewById(R.id.myTextBox);
String contents = text.getText().toString();
}
You will need to tweak the if statement to your own checkboxes and iterate through them to check are they checked and rename the code in the if statement to your oen names