Closed yezizaiqiutian closed 7 years ago
ProgressSubscriber类中ProgressDialog取消监听中是否需要增加回调,这样在监听中就可以监听到取消事件
private void initProgressDialog(boolean cancel) { Context context = mActivity.get(); if (pd == null && context != null) { pd = new ProgressDialog(context); pd.setCancelable(cancel); if (cancel) { pd.setOnCancelListener(new DialogInterface.OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { if (mSubscriberOnNextListener.get() != null) { mSubscriberOnNextListener.get().onCancel(); } onCancleProgress(); } }); } } }
恩,是的,马上加上
嗯嗯,写的非常好,很受教~~
ProgressSubscriber类中ProgressDialog取消监听中是否需要增加回调,这样在监听中就可以监听到取消事件