本文整理汇总了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());
}
}
});
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:36,代码来源:NewsMultiListAdapter.java
示例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());
}
});
}
开发者ID:lai233333,项目名称:MyDemo,代码行数:32,代码来源:MovieTopFragment.java
示例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());
}
开发者ID:AriesHoo,项目名称:FastLib,代码行数:14,代码来源:SubjectMovieAdapter.java
示例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);
}
开发者ID:chengkun123,项目名称:ReadMark,代码行数:9,代码来源:BookshelfAdapter.java
示例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);
}
开发者ID:hymanme,项目名称:MaterialHome,代码行数:9,代码来源:BookShelfAdapter.java
注:本文中的com.flyco.labelview.LabelView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论