コード例 #1
0
 public void showProgress() {
   loadingDialogFragment = new DxlLoadingDialogFragment();
   loadingDialogFragment.setLoadingString(
       TextUtils.isEmpty(loadingString) ? "加载中..." : loadingString);
   loadingDialogFragment.setCancelable(isCancleable);
   loadingDialogFragment.setOnCancelListener(onCancelListener);
   FragmentTransaction ft = baseActivity.getSupportFragmentManager().beginTransaction();
   ft.add(loadingDialogFragment, "loadingDialogFragment");
   if (ft != null && !baseActivity.isFinishing()) ft.commitAllowingStateLoss();
 }
コード例 #2
0
 public void dismissProgress() {
   if (loadingDialogFragment != null && !baseActivity.isFinishing()) {
     loadingDialogFragment.dismissAllowingStateLoss();
   }
 }