Search in sources :

Example 1 with AbAlertDialogFragment

use of com.ningcui.mylibrary.viewLib.dialog.AbAlertDialogFragment in project JustAndroid by chinaltz.

the class AbDialogUtil method showAlertDialog.

/**
     * 显示一个普通对话框.
     *
     * @param view 对话框View
     */
public static AbAlertDialogFragment showAlertDialog(View view) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    AbAlertDialogFragment alertDialogFragment = new AbAlertDialogFragment();
    alertDialogFragment.setContentView(view);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 指定一个系统转场动画
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    alertDialogFragment.show(ft, dialogTag);
    return alertDialogFragment;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) FragmentTransaction(android.app.FragmentTransaction) AbAlertDialogFragment(com.ningcui.mylibrary.viewLib.dialog.AbAlertDialogFragment)

Aggregations

FragmentTransaction (android.app.FragmentTransaction)1 FragmentActivity (android.support.v4.app.FragmentActivity)1 AbAlertDialogFragment (com.ningcui.mylibrary.viewLib.dialog.AbAlertDialogFragment)1