@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); goodService = ServiceFactory.getGoodsService(); myLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL); onLoadMoreListener = new OnLoadMoreListener() { @Override public void onLoadMore() { // 只负责其中发送请求 page.page++; goodService.getGoodByPage(page, "goods_loadMore"); } }; myListAdapter = new GoodsListAdapter(getActivity()); initData(); }
private void initData() { usersService = ServiceFactory.getUsersService(); }