use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.
the class NotificationListResource method attachTo.
public static NotificationListResource attachTo(Fragment fragment, String tag, int requestCode) {
FragmentActivity activity = fragment.getActivity();
NotificationListResource instance = FragmentUtils.findByTag(activity, tag);
if (instance == null) {
instance = newInstance();
FragmentUtils.add(instance, activity, tag);
}
instance.setTarget(fragment, requestCode);
return instance;
}
use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.
the class NotificationCountResource method attachTo.
public static NotificationCountResource attachTo(Fragment fragment, String tag, int requestCode) {
FragmentActivity activity = fragment.getActivity();
NotificationCountResource instance = FragmentUtils.findByTag(activity, tag);
if (instance == null) {
instance = newInstance();
FragmentUtils.add(instance, activity, tag);
}
instance.setTarget(fragment, requestCode);
return instance;
}
use of androidx.fragment.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);
FragmentUtils.add(instance, activity, tag);
}
instance.setTarget(fragment, requestCode);
return instance;
}
use of androidx.fragment.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);
FragmentUtils.add(instance, activity, tag);
}
instance.setTarget(fragment, requestCode);
return instance;
}
use of androidx.fragment.app.FragmentActivity in project Douya by DreaminginCodeZH.
the class ProfileResource method attachTo.
public static ProfileResource attachTo(String userIdOrUid, me.zhanghai.android.douya.network.api.info.apiv2.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);
FragmentUtils.add(instance, activity, tag);
}
instance.setTarget(fragment, requestCode);
return instance;
}
Aggregations