Search in sources :

Example 46 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project FirebaseUI-Android by firebase.

the class SignInDelegate method delegate.

public static void delegate(FragmentActivity activity, FlowParameters params) {
    FragmentManager fm = activity.getSupportFragmentManager();
    Fragment fragment = fm.findFragmentByTag(TAG);
    if (!(fragment instanceof SignInDelegate)) {
        SignInDelegate result = new SignInDelegate();
        result.setArguments(FragmentHelper.getFlowParamsBundle(params));
        fm.beginTransaction().add(result, TAG).disallowAddToBackStack().commit();
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) Fragment(android.support.v4.app.Fragment)

Example 47 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project superCleanMaster by joyoyao.

the class DialogUtil method showAlertDialog.

/**
	 * 描述:对话框dialog (标题,View内容).
	 * @param title 对话框标题内容
	 * @param view  对话框提示内容
	 */
public static AlertDialogFragment showAlertDialog(String title, View view) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    AlertDialogFragment newFragment = AlertDialogFragment.newInstance(0, title, null, view, null);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 指定一个系统转场动画   
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) FragmentTransaction(android.app.FragmentTransaction)

Example 48 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project superCleanMaster by joyoyao.

the class DialogUtil method showAlertDialog.

/**
	 * 显示一个一般的对话框(标题,View内容,确认,取消).
	 * @param title 对话框标题内容
	 * @param view 对话框提示内容
	 * @param onClickListener 点击确认按钮的事件监听
	 */
public static AlertDialogFragment showAlertDialog(String title, View view, AlertDialogFragment.DialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) view.getContext();
    AlertDialogFragment newFragment = AlertDialogFragment.newInstance(0, title, null, view, onClickListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 指定一个系统转场动画   
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) FragmentTransaction(android.app.FragmentTransaction)

Example 49 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project superCleanMaster by joyoyao.

the class DialogUtil method showAlertDialog.

/**
	 * 显示一个一般的对话框(图标,标题,View内容,确认,取消).
	 * @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;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) FragmentTransaction(android.app.FragmentTransaction)

Example 50 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project superCleanMaster by joyoyao.

the class DialogUtil method showAlertDialog.

/**
	 * 显示一个一般的对话框(图标,标题,string内容,确认,取消).
	 * @param context
	 * @param icon
	 * @param title 对话框标题内容
	 * @param message 对话框提示内容
	 * @param onClickListener 点击确认按钮的事件监听
	 */
public static AlertDialogFragment showAlertDialog(Context context, int icon, String title, String message, AlertDialogFragment.DialogOnClickListener onClickListener) {
    FragmentActivity activity = (FragmentActivity) context;
    AlertDialogFragment newFragment = AlertDialogFragment.newInstance(icon, title, message, null, onClickListener);
    FragmentTransaction ft = activity.getFragmentManager().beginTransaction();
    // 指定一个系统转场动画   
    ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    newFragment.show(ft, mDialogTag);
    return newFragment;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) FragmentTransaction(android.app.FragmentTransaction)

Aggregations

FragmentActivity (android.support.v4.app.FragmentActivity)84 FragmentTransaction (android.app.FragmentTransaction)16 FragmentManager (android.support.v4.app.FragmentManager)16 FragmentTransaction (android.support.v4.app.FragmentTransaction)16 Fragment (android.support.v4.app.Fragment)11 Intent (android.content.Intent)6 Bundle (android.os.Bundle)5 View (android.view.View)4 DialogFragment (android.support.v4.app.DialogFragment)3 MediaControllerCompat (android.support.v4.media.session.MediaControllerCompat)3 SearchView (android.widget.SearchView)3 TextView (android.widget.TextView)3 Fragment (android.app.Fragment)2 ActionBar (android.support.v7.app.ActionBar)2 AppCompatActivity (android.support.v7.app.AppCompatActivity)2 MediaRouteDialogFactory (android.support.v7.app.MediaRouteDialogFactory)2 RecyclerView (android.support.v7.widget.RecyclerView)2 InjectView (butterknife.InjectView)2 RequestManager (com.bumptech.glide.RequestManager)2 FacebookException (com.facebook.FacebookException)2