public void onLoadMore(PullToRefreshLayout pullToRefreshLayout)
 {
     BaseService.ExeRequest(async() =>
     {
         int pageIndex    = articles.Count / 25 + 1;
         var moreArticles = await BlogService.GetBolggerPosts(CommonHelper.token, blogger.BlogApp, pageIndex);
         if (moreArticles.Count > 0)
         {
             articles.AddRange(moreArticles);
             comAdaper.RefreshItems(this.articles);
             int index = (articles.Count - 15) - 3;
             pListView.Invalidate();
             pListView.SetSelection(index);
         }
         {
             Msg.AppMsg.MakeText(this, "No More Item", Msg.AppMsg.STYLE_INFO).Show();
         }
         pullToRefreshLayout.loadmoreFinish(0);
     }, this);
 }
Exemplo n.º 2
0
 public void onLoadMore(PullToRefreshLayout pullToRefreshLayout)
 {
     BaseService.ExeRequest(async() =>
     {
         int pageIndex = news.Count / pageSize + 1;
         var moreNews  = await NewsService.GetNews(CommonHelper.token, pageIndex, pageSize);
         if (moreNews.Count > 0)
         {
             news.AddRange(moreNews);
             comAdaper.RefreshItems(news);
             int index = (news.Count - 15) - 3;
             plistView.Invalidate();
             plistView.SetSelection(index);
         }
         else
         {
             Msg.AppMsg.MakeText(this.Activity, "No More Item", Msg.AppMsg.STYLE_INFO).Show();
         }
         pullToRefreshLayout.loadmoreFinish(0);
     }, this.Activity);
 }
Exemplo n.º 3
0
 public void onLoadMore(PullToRefreshLayout pullToRefreshLayout)
 {
     BaseService.ExeRequest(async() =>
     {
         int pageIndex     = bookMarks.Count / 25 + 1;
         var moreBookMarks = await BookMarkService.GetBookMarks(CommonHelper.token, pageIndex, 15);
         if (moreBookMarks.Count > 0)
         {
             bookMarks.AddRange(moreBookMarks);
             comAdaper.RefreshItems(bookMarks);
             int index = (bookMarks.Count - 15) - 3;
             pListView.Invalidate();
             pListView.SetSelection(index);
         }
         else
         {
             Msg.AppMsg.MakeText(this, "No More Item", Msg.AppMsg.STYLE_INFO).Show();
         }
         pullToRefreshLayout.loadmoreFinish(0);
     }, this);
 }
Exemplo n.º 4
0
 public void onLoadMore(PullToRefreshLayout pullToRefreshLayout)
 {
     BaseService.ExeRequest(async() =>
     {
         int pageIndex      = comments.Count / 15 + 1;
         var lastUpdateData = (await BlogService.GetArticleComments(CommonHelper.token, currentArticle.BlogApp, currentArticle.Id, pageIndex, 15));
         if (lastUpdateData.Count > 0)
         {
             comments.AddRange(lastUpdateData);
             comAdaper.RefreshItems(comments);
             int index = (comments.Count - 15) - 3;
             pListView.Invalidate();
             pListView.SetSelection(index);
         }
         else
         {
             Msg.AppMsg.MakeText(this, "No More Item", Msg.AppMsg.STYLE_INFO).Show();
         }
         pullToRefreshLayout.loadmoreFinish(0);
     }, this);
 }