本文整理汇总了Java中com.justwayward.reader.bean.CategoryList类的典型用法代码示例。如果您正苦于以下问题:Java CategoryList类的具体用法?Java CategoryList怎么用?Java CategoryList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CategoryList类属于com.justwayward.reader.bean包,在下文中一共展示了CategoryList类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onBindData
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
@Override
protected void onBindData(final EasyRVHolder holder, final int position, final CategoryList.MaleBean item) {
holder.setText(R.id.tvName, item.name)
.setText(R.id.tvBookCount, String.format(mContext.getString(R.string
.category_book_count), item.bookCount));
holder.setOnItemViewClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
itemClickListener.onItemClick(holder.getItemView(), position, item);
}
});
}
示例2: getCategoryList
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
@Override
public void getCategoryList() {
String key = StringUtils.creatAcacheKey("book-category-list");
Observable<CategoryList> fromNetWork = bookApi.getCategoryList()
.compose(RxUtil.<CategoryList>rxCacheBeanHelper(key));
//依次检查disk、network
Subscription rxSubscription = Observable.concat(RxUtil.rxCreateDiskObservable(key, CategoryList.class), fromNetWork)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<CategoryList>() {
@Override
public void onNext(CategoryList data) {
if (data != null && mView != null) {
mView.showCategoryList(data);
}
}
@Override
public void onCompleted() {
LogUtils.i("complete");
mView.complete();
}
@Override
public void onError(Throwable e) {
LogUtils.e(e.toString());
mView.complete();
}
});
addSubscrebe(rxSubscription);
}
示例3: showCategoryList
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
@Override
public void showCategoryList(CategoryList data) {
mMaleCategoryList.clear();
mFemaleCategoryList.clear();
mMaleCategoryList.addAll(data.male);
mFemaleCategoryList.addAll(data.female);
mMaleCategoryListAdapter.notifyDataSetChanged();
mFemaleCategoryListAdapter.notifyDataSetChanged();
}
示例4: getCategoryList
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
public synchronized Observable<CategoryList> getCategoryList() {
return service.getCategoryList();
}
示例5: TopCategoryListAdapter
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
public TopCategoryListAdapter(Context context, List<CategoryList.MaleBean> list, OnRvItemClickListener listener) {
super(context, list, R.layout.item_top_category_list);
this.itemClickListener = listener;
}
示例6: onItemClick
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
@Override
public void onItemClick(View view, int position, CategoryList.MaleBean data) {
SubCategoryListActivity.startActivity(mContext, data.name, gender);
}
示例7: getCategoryList
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
/**
* 获取分类
*
* @return
*/
@GET("/cats/lv2/statistics")
Observable<CategoryList> getCategoryList();
示例8: showCategoryList
import com.justwayward.reader.bean.CategoryList; //导入依赖的package包/类
void showCategoryList(CategoryList data);