Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Backendless.Data.of(News.class).find(new AsyncCallback<BackendlessCollection<News>>() {
- @Override
- public void handleResponse(BackendlessCollection<News> news) {
- final Iterator<News> newsIterator = news.getCurrentPage().iterator();
- // number of checked tweets
- checkedNewsCount = new AtomicInteger(0);
- // for(News currentNews : news){
- // System.out.println("--------");
- // System.out.println("Body: " + currentNews.getBody());
- // System.out.println("Author: " + currentNews.getAuthorName());
- // System.out.println("--------");
- // }
- while (newsIterator.hasNext()) {
- News currentNews = newsIterator.next();
- System.out.println("--------");
- System.out.println("Body: " + currentNews.getBody());
- System.out.println("Author: " + currentNews.getAuthorName());
- System.out.println("--------");
- }
- NewsAdapter adapter = newsAdapterRef!=null? newsAdapterRef.get(): null;
- if (adapter != null) adapter.setData(newsList);
- ViewFlipper flipper = flipperRef != null? flipperRef.get(): null;
- if (flipper!= null && flipper.getDisplayedChild() != 0) flipper.showNext();
- }
- @Override
- public void handleFault(BackendlessFault backendlessFault) {
- System.out.println("Server reported an error - " + backendlessFault.getMessage());
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement