Example #1
0
 public List<Poem> getData() {
   if (RANDOM.equals(classfy)) {
     return jsonUtil.getRandomPoem();
   } else if (AUTHOR.equals(classfy)) {
     List<Poem> poems = jsonUtil.getPoemByAuthorName(info, listView.getPage());
     if (poems.size() >= 1) {
       return poems;
     }
     return null;
   } else if (STYLE.equals(classfy)) {
     List<Poem> poems = jsonUtil.getPoemByTag(info, listView.getPage());
     if (poems.size() >= 1) {
       return poems;
     }
     return null;
   }
   // TODO还没有做完,分类没有全部完成
   return jsonUtil.getRandomPoem();
 }