public static DoneChallengesFragment create(int pageNumber) { DoneChallengesFragment fragment = new DoneChallengesFragment(); fragment.setRetainInstance(true); Bundle args = new Bundle(); args.putInt(ARG_PAGE, pageNumber); fragment.setArguments(args); return fragment; }
@Override public void handleMessage(Message msg) { DoneChallengesFragment theFrag = mFrag.get(); Input input = null; if (msg.obj instanceof Input) { input = (Input) msg.obj; } if (input != null && input.isSucces() && msg.arg2 == 0) { theFrag.challengesList = input.getChallenges(); theFrag.adapter.setChallenges(input.getChallenges()); theFrag.loaded = true; } theFrag.showLoading(false); super.handleMessage(msg); }