After AlertView closed, application freezes.
Anybody knows the solution?
I did this:
UIAlertView alertView =
UIAlertView.alloc().init();
alertView.setMessage("Cannot Show Rss news: " + errorMessage + " Try again?");
alertView.setDelegate(new UIAlertViewDelegate() {
@Override
public void alertViewClickedButtonAtIndex(UIAlertView alertView, @NInt long buttonIndex) {
if (buttonIndex == 0) {
// try
refreshControll.beginRefreshing();
loadURL(url, true);
alertView.dismissWithClickedButtonIndexAnimated(buttonIndex, true);
} else {
//cancel
alertView.dismissWithClickedButtonIndexAnimated(buttonIndex, true);
}
}
});
alertView.addButtonWithTitle("Try");
alertView.addButtonWithTitle("Cancel");
alertView.show();