예제 #1
0
 @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();
 }
예제 #2
0
 private void initData() {
   usersService = ServiceFactory.getUsersService();
 }