protected void setBookDesc2(Book book, TextView txvBookDesc) { String chapterTitle = book.getLastChapterTitle(); if (chapterTitle == null) { chapterTitle = AppDBOverseer.get().getBookLastChapterTitle(book.getId()); book.setLastChapterTitle(chapterTitle); } txvBookDesc.setText( String.format(getActivity().getString(R.string.last_chapter_tip), chapterTitle)); }
protected void setBookDesc1(Book book, TextView txvBookDesc) { int unreadChapterCount = book.getUnreadChapterCount(); if (unreadChapterCount == -1) { unreadChapterCount = AppDBOverseer.get().getBookUnreadChapterCount(book.getId()); book.setUnreadChapterCount(unreadChapterCount); } txvBookDesc.setText( unreadChapterCount > 0 ? String.format( getActivity().getString(R.string.unread_chapters_tip), unreadChapterCount) : getActivity().getString(R.string.havent_unread_chapters_tip)); }