List of usage examples for android.app FragmentTransaction TRANSIT_FRAGMENT_OPEN
int TRANSIT_FRAGMENT_OPEN
To view the source code for android.app FragmentTransaction TRANSIT_FRAGMENT_OPEN.
Click Source Link
From source file:com.tony.selene.util.AbDialogUtil.java
/** * //from www .j av a2 s.co m * ???. * * @param view * @param gravity * ? * @param style * @return */ public static AbSampleDialogFragment showDialog(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; }
From source file:com.google.cast.samples.games.gamedebugger.MainActivity.java
private void updateFragments() { if (isChangingConfigurations() || isFinishing() || isDestroyed()) { return;/*from w w w . ja v a 2 s .c o m*/ } Fragment fragment; CastConnectionManager manager = GameDebuggerApplication.getInstance().getCastConnectionManager(); if (manager.isConnectedToReceiver()) { fragment = mDebuggerFragment; } else { fragment = mCastConnectionFragment; } getFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment) .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN).commitAllowingStateLoss(); }
From source file:ab.util.AbDialogUtil.java
/** * ??// w w w . ja va 2s .com * * @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); newFragment.setContentView(view); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, mDialogTag); return newFragment; }
From source file:com.aoppp.gatewaymaster.dialogs.DialogUtil.java
/** * ???dialog View./*from www .j av a 2 s .c o m*/ * @param icon * @param title ? * @param view ??? */ public static AlertDialogFragment showAlertDialog(int icon, String title, View view) { FragmentActivity activity = (FragmentActivity) view.getContext(); AlertDialogFragment newFragment = AlertDialogFragment.newInstance(icon, title, null, view, null); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, mDialogTag); return newFragment; }
From source file:com.google.cast.samples.games.spellcast.MainActivity.java
public void showFragment(Fragment fragment) { Fragment currentFragment = getFragmentManager().findFragmentById(R.id.fragment_container); mNextFragment = null;//from w w w .jav a 2s . co m if (currentFragment == fragment) { return; } if (isChangingConfigurations() || isFinishing() || isDestroyed()) { mNextFragment = fragment; } else { // We need to request the orientation change before we perform the fragment transition, // otherwise the fragment would start in the wrong orientation. if (fragment == mCombatFragment) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); } getFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment) .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN).commit(); } }
From source file:com.bangqu.eshow.util.ESDialogUtil.java
/** * // w ww . jav a 2 s. c om * ???. * @param view * @param gravity ? * @param style * @param onCancelListener? * @return */ public static ESSampleDialogFragment showDialog(View view, int gravity, int style, DialogInterface.OnCancelListener onCancelListener) { FragmentActivity activity = (FragmentActivity) view.getContext(); // Create and show the dialog. ESSampleDialogFragment newFragment = ESSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, style, gravity); newFragment.setContentView(view); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.setOnCancelListener(onCancelListener); newFragment.show(ft, dialogTag); return newFragment; }
From source file:cn.org.eshow.framwork.util.AbDialogUtil.java
/** * // ww w . ja va 2s . co m * ???. * @param view * @param gravity ? * @param style * @param onCancelListener? * @return */ public static AbSampleDialogFragment showDialog(View view, int gravity, int style, DialogInterface.OnCancelListener onCancelListener) { 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.setOnCancelListener(onCancelListener); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.tony.selene.dialog.AbDialogUtil.java
/** * /* w ww. j a v a 2s.co m*/ * ???. * * @param view * @param gravity * ? * @param style * @param onCancelListener * ? * @return */ public static AbSampleDialogFragment showDialog(View view, int gravity, int style, DialogInterface.OnCancelListener onCancelListener) { 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.setOnCancelListener(onCancelListener); newFragment.show(ft, dialogTag); return newFragment; }
From source file:com.aoppp.gatewaymaster.dialogs.DialogUtil.java
/** * ?View?.// w ww . jav a 2 s . c om * @param icon * @param title ? * @param view ??? * @param onClickListener ? */ public static AlertDialogFragment showAlertDialog(int icon, String title, View view, AlertDialogFragment.DialogOnClickListener onClickListener) { FragmentActivity activity = (FragmentActivity) view.getContext(); AlertDialogFragment newFragment = AlertDialogFragment.newInstance(icon, title, null, view, onClickListener); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, mDialogTag); return newFragment; }
From source file:ab.util.AbDialogUtil.java
/** * //from w w w . ja v a2s . c o m * ???(). * * @param view * @param gravity * ? * @return */ public static AbSampleDialogFragment showDialog(View view, int gravity) { FragmentActivity activity = (FragmentActivity) view.getContext(); // Create and show the dialog. AbSampleDialogFragment newFragment = AbSampleDialogFragment.newInstance(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Holo_Light_Dialog, gravity); newFragment.setContentView(view); FragmentTransaction ft = activity.getFragmentManager().beginTransaction(); // ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); newFragment.show(ft, mDialogTag); return newFragment; }