Ejemplo n.º 1
0
 @Override
 public void onSuccessLoad(int tag, Object result) {
   if (tag == getMyLikeModel.getTag()) {
     MyLikeSpecialResponse response = (MyLikeSpecialResponse) result;
     MyLikeSpecialEntity entity = response.getData();
     datas.addAll(entity.getDatas());
     adapter.notifyDataSetChanged();
     myticketRefresh.setRefreshing(false);
   }
   myticketRecyclerview.loadMoreComplete();
 }
Ejemplo n.º 2
0
 @Override
 public void initView() {
   ButterKnife.bind(this);
   adapter = new HomeWorkAdapter(datas, this);
   myticketRecyclerview.setLayoutManager(new GridLayoutManager(this, 2));
   myticketRecyclerview.setLoadingListener(this);
   myticketRecyclerview.setAdapter(adapter);
   tvTitle.setText("我赞过的");
   ivTitleLeft.setVisibility(View.VISIBLE);
   myticketRefresh.setOnRefreshListener(
       new SwipeRefreshLayout.OnRefreshListener() {
         @Override
         public void onRefresh() {
           pageNo = 1;
           datas.clear();
           myticketRefresh.setRefreshing(true);
           getMyLikeModel.start(pageNo + "");
           myticketRecyclerview.resetStatus();
         }
       });
 }