setOnShowListener

fun setOnShowListener(isTimeTrackingEnabled: Boolean = false, onShowListener: DialogInterface.OnShowListener?)

Sets the DialogInterface.OnShowListener for ProgressDialog. Time Tracking is disabled by Default. It can be enabled by passing true to the isTimeTrackingEnabled parameter of the function. The onshowListener parameter can be null when isTimeTrackingEnabled parameter is passed. If null is passed for onShowListener when isTimeTrackingEnabled is not passed, no listener will be set. Enabling Time Tracking will make isCancelable to true automatically, since Time Tracking is an indefinite operation. It is recommended to set NEGATIVE BUTTON using setNegativeButton Method or set DialogInterface.OnDismissListener using setOnDismissListener after enabling Time Tracking feature. Time Tracking will stop when progress reaches maxValue or when the Dialog is dismissed or cancelled.

Parameters

onShowListener

Throws

when attempting to enable Time Tracking in MODE_INDETERMINATE Mode.