how to setcheck in checkbox in listview when user clicks positive button in custom alert dialog?

StackOverflow https://stackoverflow.com/questions/21378744

문제

In my application i have created a list view and check box.When the user clicks any item in the listview a alert dialog should appear and when the user clicks positive button on alert dialog the checkbox has to checked automatically. How to perform this action? Please help me.

도움이 되었습니까?

해결책

Take a boolean variable and set its default value to false on the creation of every dialog and on the click of positive button of alert dialog set it to true and make a check on the close of dialog if variable is true then set check for that particular checkbox in listview

다른 팁

create a base adapter as private class. Pass the checkbox in the listview as a parameter when the checkbox in popup is triggered also trigger this checkbox which is passed as parameter

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top