本文整理汇总了Java中com.zhy.adapter.recyclerview.base.ViewHolder.setText方法的典型用法代码示例。如果您正苦于以下问题:Java ViewHolder.setText方法的具体用法?Java ViewHolder.setText怎么用?Java ViewHolder.setText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.zhy.adapter.recyclerview.base.ViewHolder
的用法示例。
在下文中一共展示了ViewHolder.setText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAdapter
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
private CommonAdapter getAdapter() {
return new CommonAdapter<Tip>(this,R.layout.item_layout,tips) {
@Override
protected void convert(ViewHolder holder, final Tip tip, int position) {
holder.setText(R.id.poi_field_id,tip.getName());
holder.setText(R.id.poi_value_id,tip.getDistrict());
holder.getView(R.id.item_layout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EventBus.getDefault().post(tip);
finish();
}
});
}
};
}
示例2: getAdapter
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
private CommonAdapter getAdapter() {
return new CommonAdapter<ListViewHoldier>(this,R.layout.item_listview_location,data) {
@Override
protected void convert(ViewHolder holder, final ListViewHoldier listViewHoldier, int position) {
holder.setText(R.id.rl_tv_name,listViewHoldier.title);
holder.setText(R.id.rl_tv_location,listViewHoldier.address);
holder.getView(R.id.rl_tv_subit).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Intent intent = new Intent(mContext,NavigationActivity.class);
// intent.putExtra("value",listViewHoldier.lp);
// intent.putExtra("address",listViewHoldier.address);
// setResult(RESULT_OK,intent);
Tip tip = new Tip();
tip.setDistrict(listViewHoldier.address);
tip.setPostion(listViewHoldier.lp);
EventBus.getDefault().postSticky(tip);
finish();
}
});
}
};
}
示例3: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, final ResolveInfo resolveInfo, int position) {
holder.setImageDrawable(R.id.image_view_resolver_icon,
resolveInfo.loadIcon(mPackageManager));
holder.setText(R.id.text_view_resolve_display_name,
resolveInfo.loadLabel(mPackageManager).toString());
holder.getConvertView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (mOnResolveInfoListener != null) {
mOnResolveInfoListener.onResolveInfoClick(resolveInfo);
}
}
});
}
示例4: convertItem
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convertItem(ViewHolder holder, final PlayBean playBean, int position) {
holder.setImageUrl(R.id.thumnails,playBean.thumb,new GlideRoundTransform(mActivity,5));
holder.setText(R.id.title,playBean.title);
holder.setText(R.id.tv_viewnum,playBean.view);
holder.setText(R.id.nickName,playBean.nick);
holder.setImageUrl(R.id.ic_head,playBean.avatar,new GlideCircleTransform(mActivity));
holder.getItemView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent =new Intent(mActivity, CommonLiveUI.class);
intent.putExtra("playBean",playBean);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.anim_slide_in_right,R.anim.anim_slide_out_left);
}
});
}
示例5: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
public void convert(ViewHolder holder, ChatMessage chatMessage, int position)
{
holder.setText(R.id.chat_send_content, chatMessage.getContent());
holder.setText(R.id.chat_send_name, chatMessage.getName());
holder.setImageResource(R.id.chat_send_icon, chatMessage.getIcon());
}
示例6: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
public void convert(ViewHolder holder, ChatMessage chatMessage, int position)
{
holder.setText(R.id.chat_from_content, chatMessage.getContent());
holder.setText(R.id.chat_from_name, chatMessage.getName());
holder.setImageResource(R.id.chat_from_icon, chatMessage.getIcon());
}
示例7: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, HotGoods.ListBean bean, int position) {
holder.setText(R.id.text_title, bean.getName());
holder.setText(R.id.text_price, "¥" + bean.getPrice());
GlideUtils.load(CNiaoApplication.sContext, bean.getImgUrl(), (ImageView) holder.getView(R
.id.iv_view));
}
示例8: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, final FileInfo fileInfo, int position) {
holder.setText(R.id.text_view_file_info_name, fileInfo.getName());
if (fileInfo.isFile()) {
holder.setImageResource(R.id.image_view_file_info_icon, R.drawable.ic_insert_drive_file_pink_a400_36dp);
} else {
holder.setImageResource(R.id.image_view_file_info_icon, R.drawable.ic_folder_light_blue_500_36dp);
}
holder.getConvertView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
EventBus.getDefault().post(fileInfo);
}
});
}
示例9: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder viewHolder, final MediaType item, int position) {
viewHolder.setText(R.id.text_view_media_type_name, item.getDisplayName());
viewHolder.getConvertView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOnMediaTypesListener.onMediaType(item);
}
});
}
示例10: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, final Resolver resolver, int position) {
holder.setImageDrawable(R.id.image_view_resolver_icon, resolver.loadIcon(mPackageManager));
holder.setText(R.id.text_view_resolve_display_name, resolver.loadLabel(mPackageManager));
holder.getConvertView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mOnResolversListener.onResolver(resolver);
}
});
}
示例11: convertItem
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convertItem(ViewHolder holder, final PlayBean playBean, int position) {
holder.setImageUrl(R.id.thumnails,playBean.thumb,new GlideRoundTransform(mActivity,5));
holder.setText(R.id.tv_viewnum,playBean.view);
holder.setText(R.id.intro,playBean.title);
holder.getItemView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent =new Intent(mActivity, VerFullLiveUI.class);
intent.putExtra("playBean",playBean);
getActivity().startActivity(intent);
getActivity().overridePendingTransition(R.anim.anim_slide_in_right,R.anim.anim_slide_out_left);
}
});
}
示例12: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, final ItemColumn itemColumn, int position) {
//
holder.setText(R.id.name,itemColumn.name);
holder.setImageUrl(R.id.thumnails,itemColumn.image,new GlideRoundTransform(mContext,1.5f));
holder.getItemView().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mActivity, ColumnListActivity.class);
intent.putExtra("itemColumn",itemColumn);
mActivity.startActivity(intent);
}
});
}
示例13: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, String s, int position) {
holder.setText(R.id.tv_content, s);
}
示例14: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
protected void convert(ViewHolder holder, Category category, int position) {
holder.setText(R.id.textView,category.getName());
}
示例15: convert
import com.zhy.adapter.recyclerview.base.ViewHolder; //导入方法依赖的package包/类
@Override
public void convert(ViewHolder holder, RobotMSGBean robotMSGBean, int position) {
holder.setText(R.id.tv_msg_right, robotMSGBean.getMsg());
}