private static BroadcastLikerListResource attachTo( long broadcastId, FragmentActivity activity, String tag, boolean targetAtActivity, Fragment targetFragment, int requestCode) { BroadcastLikerListResource resource = FragmentUtils.findByTag(activity, tag); if (resource == null) { resource = newInstance(broadcastId); if (targetAtActivity) { resource.targetAtActivity(requestCode); } else { resource.targetAtFragment(targetFragment, requestCode); } FragmentUtils.add(resource, activity, tag); } return resource; }
private static BroadcastLikerListResource newInstance(long broadcastId) { //noinspection deprecation BroadcastLikerListResource resource = new BroadcastLikerListResource(); resource.setArguments(broadcastId); return resource; }