本文整理汇总了Java中com.flyco.labelview.LabelView类的典型用法代码示例。如果您正苦于以下问题:Java LabelView类的具体用法?Java LabelView怎么用?Java LabelView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LabelView类属于com.flyco.labelview包,在下文中一共展示了LabelView类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _handleNewsNormal
import com.flyco.labelview.LabelView; //导入依赖的package包/类
/**
* 处理正常的新闻
*
* @param holder
* @param item
*/
private void _handleNewsNormal(final BaseViewHolder holder, final NewsInfo item) {
ImageView newsIcon = holder.getView(R.id.iv_icon);
ImageLoader.loadCenterCrop(mContext, item.getImgsrc(), newsIcon, DefIconFactory.provideIcon());
holder.setText(R.id.tv_title, item.getTitle())
.setText(R.id.tv_source, StringUtils.clipNewsSource(item.getSource()))
.setText(R.id.tv_time, item.getPtime());
// 设置标签
if (NewsUtils.isNewsSpecial(item.getSkipType())) {
LabelView labelView = holder.getView(R.id.label_view);
labelView.setVisibility(View.VISIBLE);
labelView.setText("专题");
} else {
holder.setVisible(R.id.label_view, false);
}
// 波纹效果
RippleView rippleLayout = holder.getView(R.id.item_ripple);
rippleLayout.setOnRippleCompleteListener(new RippleView.OnRippleCompleteListener() {
@Override
public void onComplete(RippleView rippleView) {
if (NewsUtils.isNewsSpecial(item.getSkipType())) {
SpecialActivity.launch(mContext, item.getSpecialID());
} else {
// 旧的实现方式和网易的比较相近,感兴趣的可以切换看看
// NewsDetailActivity.launch(mContext, item.getPostid());
NewsArticleActivity.launch(mContext, item.getPostid());
}
}
});
}
示例2: initView
import com.flyco.labelview.LabelView; //导入依赖的package包/类
@Override
protected void initView() {
mPresenter = new MoviePresenterImpl(this,start);
mAdapter = new BaseQuickAdapter<MovieItemBean, BaseViewHolder>(R.layout.item_movie_top) {
@Override
protected void convert(BaseViewHolder helper, MovieItemBean item) {
ImageLoadUtil.loadFitCenter(item.getImages().getLarge(), (ImageView) helper.getView(R.id.iv_movie_icon));
helper.setRating(R.id.rb_movie_rating, (float) (item.getRating().getAverage()/2.0));
helper.setText(R.id.tv_movie_rating, item.getRating().getAverage()+"");
helper.setText(R.id.tv_movie_title, item.getTitle());
helper.setText(R.id.tv_movie_director, "导演:"+MovieFragment.formatName(item.getDirectors()));
helper.setText(R.id.tv_movie_actor, "主演:"+MovieFragment.formatName(item.getCasts()));
//helper.setText(R.id.tv_movie_type,"类型:"+MovieFragment.formatGenres(item.getGenres()));
helper.setText(R.id.tv_movie_collect_count,+item.getCollect_count()+"人看过");
final LabelView labelView = helper.getView(R.id.lv_index);
labelView.setText(helper.getLayoutPosition()+1+start+"");
}
};
mAdapter.setEnableLoadMore(false);
mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_BOTTOM);
mRvMovie.setLayoutManager(new LinearLayoutManager(getActivity()));
mRvMovie.setAdapter(mAdapter);
mAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
MovieItemBean item = (MovieItemBean) adapter.getItem(position);
MovieDetailActivity.launchActivity(getActivity(), view.findViewById(R.id.iv_movie_icon), item.getId(),item.getTitle(),item.getImages().getLarge());
}
});
}
示例3: convert
import com.flyco.labelview.LabelView; //导入依赖的package包/类
@Override
protected void convert(BaseViewHolder helper, SubjectsEntity item) {
helper.setText(R.id.tv_titleMovie, item.title)
.setText(R.id.tv_typeMovie, "题材:" + item.getGenres())
.setText(R.id.tv_yearMovie, "年份:" + item.year)
.setText(R.id.tv_directorMovie, "导演:" + item.getDirectors())
.setText(R.id.tv_castMovie, "主演:" + item.getCasts());
GlideManager.loadRoundImg(item.images.large, helper.getView(R.id.iv_coverMovie),2);
LabelView labelView = helper.getView(R.id.lv_topMovie);
labelView.setText("Top" + (helper.getLayoutPosition() + 1));
labelView.setVisibility(isShowTop ? View.VISIBLE : View.GONE);
RadiusViewHelper.getInstance().setRadiusViewAdapter(((RadiusRelativeLayout) helper.itemView).getDelegate());
}
示例4: BookShelfHolder
import com.flyco.labelview.LabelView; //导入依赖的package包/类
public BookShelfHolder(View itemView){
super(itemView);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
labelView = (LabelView) itemView.findViewById(R.id.label_layout);
tv_bookshelf_name = (TextView) itemView.findViewById(R.id.tv_bookshelf_name);
tv_remark = (TextView) itemView.findViewById(R.id.tv_remark);
tv_create_time = (TextView) itemView.findViewById(R.id.tv_create_time);
}
示例5: BookShelfHolder
import com.flyco.labelview.LabelView; //导入依赖的package包/类
public BookShelfHolder(View itemView) {
super(itemView);
rl_content = (RelativeLayout) itemView.findViewById(R.id.rl_content);
labelView = (LabelView) itemView.findViewById(R.id.label_layout);
tv_bookshelf_name = (TextView) itemView.findViewById(R.id.tv_bookshelf_name);
tv_remark = (TextView) itemView.findViewById(R.id.tv_remark);
tv_create_time = (TextView) itemView.findViewById(R.id.tv_create_time);
}