Search in sources :

Example 81 with FragmentActivity

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

the class BroadcastResource method attachTo.

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

Example 82 with FragmentActivity

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

the class HomeBroadcastListResource method attachTo.

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

Example 83 with FragmentActivity

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

the class BroadcastListResource method attachTo.

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

Example 84 with FragmentActivity

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

the class UserDiaryListResource method attachTo.

public static UserDiaryListResource attachTo(String userIdOrUid, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    UserDiaryListResource 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 85 with FragmentActivity

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

the class ProfileResource method attachTo.

public static ProfileResource attachTo(String userIdOrUid, SimpleUser simpleUser, User user, Fragment fragment, String tag, int requestCode) {
    FragmentActivity activity = fragment.getActivity();
    ProfileResource instance = FragmentUtils.findByTag(activity, tag);
    if (instance == null) {
        instance = newInstance(userIdOrUid, simpleUser, user);
        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