use of com.ningcui.mylibrary.viewLib.dialog.AbProgressDialogFragment in project JustAndroid by chinaltz.
the class AbDialogUtil method showProgressDialog.
/**
* 显示进度框.
*
* @param context the context
* @param indeterminateDrawable 用默认请写0
* @param message the message
* @param isCancelable 是否可以取消
*/
public static AbProgressDialogFragment showProgressDialog(Context context, int indeterminateDrawable, String message, boolean isCancelable) {
FragmentActivity activity = (FragmentActivity) context;
AbProgressDialogFragment newFragment = AbProgressDialogFragment.newInstance(indeterminateDrawable, message, isCancelable);
FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
// 指定一个系统转场动画
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
newFragment.show(ft, dialogTag);
return newFragment;
}
Aggregations