My app shows a listview, where every item has a checkbox and 2 labels; when the user will touch the checkbox a dialog will pop-up. This dialog will have a positive and a negative button; I’d like the checkbox to return unchecked if the negative button is pressed. I tried doing this easily (calling the Checkbox on the on the onClick event) but apparently when I’m into an event I can only read values from the listview, and I can’t edit any widget state from the main activity.
Did I miss something? Is there any way to change an Activity’s view from a dialog?
My app shows a listview, where every item has a checkbox and 2 labels;
Share
maintain a global array of boolean and set the flag for the checkbox based on the what button the user clicks in the alert dialog. In the onclicklisteners of the button call notifydatasetchanged() for your list adapter