本文整理匯總了Java中com.justwayward.reader.bean.BooksByTag.TagBook方法的典型用法代碼示例。如果您正苦於以下問題:Java BooksByTag.TagBook方法的具體用法?Java BooksByTag.TagBook怎麽用?Java BooksByTag.TagBook使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.justwayward.reader.bean.BooksByTag
的用法示例。
在下文中一共展示了BooksByTag.TagBook方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onBindData
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
@Override
protected void onBindData(final EasyRVHolder holder, final int position, final BooksByTag.TagBook item) {
StringBuffer sbTags = new StringBuffer();
for (String tag : item.tags) {
if (!TextUtils.isEmpty(tag)) {
sbTags.append(tag);
sbTags.append(" | ");
}
}
holder.setRoundImageUrl(R.id.ivBookCover, Constant.IMG_BASE_URL + item.cover, R.drawable.cover_default)
.setText(R.id.tvBookListTitle, item.title)
.setText(R.id.tvShortIntro, item.shortIntro)
.setText(R.id.tvTags, (item.tags.size() == 0 ? "" : sbTags.substring(0, sbTags
.lastIndexOf(" | "))));
holder.setOnItemViewClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
itemClickListener.onItemClick(holder.getItemView(), position, item);
}
});
}
示例2: showBooksByTag
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
@Override
public void showBooksByTag(List<BooksByTag.TagBook> list, boolean isRefresh) {
if (isRefresh)
mList.clear();
mList.addAll(list);
current = mList.size();
mAdapter.notifyDataSetChanged();
}
示例3: showSearchResultList
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
@Override
public void showSearchResultList(List<BooksByTag.TagBook> list) {
List<SearchDetail.SearchBooks> mList = new ArrayList<>();
for (BooksByTag.TagBook book : list) {
mList.add(new SearchDetail.SearchBooks(book._id, book.title, book.author, book.cover, book.retentionRatio, book.latelyFollower));
}
mAdapter.clear();
mAdapter.addAll(mList);
}
示例4: BooksByTagAdapter
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
public BooksByTagAdapter(Context context, List<BooksByTag.TagBook> list,
OnRvItemClickListener listener) {
super(context, list, R.layout.item_tag_book_list);
this.itemClickListener = listener;
}
示例5: onItemClick
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
@Override
public void onItemClick(View view, int position, BooksByTag.TagBook data) {
startActivity(new Intent(BooksByTagActivity.this, BookDetailActivity.class)
.putExtra("bookId", data._id));
}
示例6: showBooksByTag
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
void showBooksByTag(List<BooksByTag.TagBook> list, boolean isRefresh);
示例7: showSearchResultList
import com.justwayward.reader.bean.BooksByTag; //導入方法依賴的package包/類
void showSearchResultList(List<BooksByTag.TagBook> list);