Kaopiz / KProgressHUD

An implement of ProgressHUD for Android, similar to MBProgressHUD, SVProgressHUD for iOS.
Apache License 2.0
1.65k stars 382 forks source link

OnCancelled listener #15

Closed rkarodia closed 8 years ago

rkarodia commented 8 years ago

There's currently no way to set a OnCancelListener

tuanna-hsp commented 8 years ago

I don't see why you need a OnCancelListener but since you can manually call dismiss(), you know its going to be cancelled, right? Or if the dialog closed by user pressing back button, you can catch the event and check if the dialog is showing.

janbolat commented 6 years ago

@tuanna-hsp How you catch the event when Back button is pressed? Activity's onBackPressed is not fired when dialog is shown...

Shubham-Kathe commented 5 years ago

Yes ,There is no way to handle OnCancelled Event.Activity/Fragment not recognizing onBackpress event when Dialog is shown. there should be option like Ex. ProgressDialog myDialog = ProgressDialog.show( mContext, "Please wait...", "Loading the data", true, true, new DialogInterface.OnCancelListener(){ @Override public void onCancel(DialogInterface dialog) { Log.d(TAG,"onCancel"); objName.cancel(true); } } );