use of com.ningcui.mylibrary.viewLib.dialog.AbSampleDialogFragment in project JustAndroid by chinaltz.
the class AbDialogUtil method showFullScreenDialog.
/**
* 显示一个全屏对话框.
*
* @param view
* @return
*/
public static AbSampleDialogFragment showFullScreenDialog(View view) {
FragmentActivity activity = (FragmentActivity) view.getContext();
// Create and show the dialog.
AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Black_NoTitleBar_Fullscreen, Gravity.CENTER);
newFragment.setContentView(view);
FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
// 指定一个系统转场动画
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
newFragment.show(ft, dialogTag);
return newFragment;
}
use of com.ningcui.mylibrary.viewLib.dialog.AbSampleDialogFragment in project JustAndroid by chinaltz.
the class AbDialogUtil method showDialogOrPanel.
/**
* 自定义的对话框面板.
*
* @param view View
* @param gravity 位置
* @param style 样式 ThemeHoloLightDialog ThemeLightPanel
* @return
*/
private static AbSampleDialogFragment showDialogOrPanel(View view, int gravity, int style) {
FragmentActivity activity = (FragmentActivity) view.getContext();
// Create and show the dialog.
AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style, gravity);
newFragment.setContentView(view);
FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
// 指定一个系统转场动画
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
newFragment.show(ft, dialogTag);
return newFragment;
}
Aggregations