Search in sources :

Example 26 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project Robot-Scouter by SUPERCILEX.

the class ActivityScoutListFragment method onAuthStateChanged.

@Override
public void onAuthStateChanged(@NonNull FirebaseAuth auth) {
    if (getActivity().getCallingActivity() != null && isTabletMode(getContext())) {
        FragmentActivity activity = getActivity();
        activity.setResult(Activity.RESULT_OK, new Intent().putExtra(KEY_SCOUT_ARGS, getBundle()));
        activity.finish();
    } else {
        super.onAuthStateChanged(auth);
    }
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity) Intent(android.content.Intent)

Example 27 with FragmentActivity

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

the class DialogUtil method showAlertDialog.

/**
	 * 显示一个一般的对话框(String内容).
	 * @param context
	 *
	 */
public static AlertDialogFragment showAlertDialog(Context context, String message) {
    FragmentActivity activity = (FragmentActivity) context;
    AlertDialogFragment newFragment = AlertDialogFragment.newInstance(0, null, message, null, 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 28 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class FollowerListResource method attachTo.

public static FollowerListResource attachTo(String userIdOrUid, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    FollowerListResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(userIdOrUid);
        instance.targetAt(fragment, requestCode);
        FragmentUtils.add(instance, activity, tag);
    }
    return instance;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity)

Example 29 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class FollowingListResource method attachTo.

public static FollowingListResource attachTo(String userIdOrUid, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    FollowingListResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(userIdOrUid);
        instance.targetAt(fragment, requestCode);
        FragmentUtils.add(instance, activity, tag);
    }
    return instance;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity)

Example 30 with FragmentActivity

use of android.support.v4.app.FragmentActivity in project Douya by DreaminginCodeZH.

the class MovieResource method attachTo.

public static MovieResource attachTo(long movieId, SimpleMovie simpleMovie, Movie movie, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    MovieResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(movieId, simpleMovie, movie);
        instance.targetAt(fragment, requestCode);
        FragmentUtils.add(instance, activity, tag);
    }
    return instance;
}
Also used : FragmentActivity(android.support.v4.app.FragmentActivity)

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