当前位置: 首页>>代码示例>>Java>>正文


Java ViewHolder.setText方法代码示例

本文整理汇总了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();
                }
            });
        }
    };
}
 
开发者ID:Vicent9920,项目名称:MyMap,代码行数:19,代码来源:PoiSearchActivity.java

示例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();
                }
            });
        }
    };
}
 
开发者ID:Vicent9920,项目名称:MyMap,代码行数:26,代码来源:PiclocationActivity.java

示例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);
            }
        }
    });
}
 
开发者ID:JulianAndroid,项目名称:AppChooser,代码行数:17,代码来源:ResolveInfosFragment.java

示例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);
        }
    });
}
 
开发者ID:a371166028,项目名称:likequanmintv,代码行数:18,代码来源:BaseLiveWraperFragment.java

示例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());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:MsgSendItemDelagate.java

示例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());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:MsgComingItemDelagate.java

示例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));
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:9,代码来源:SecondGoodsAdapter.java

示例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);
        }
    });
}
 
开发者ID:JulianAndroid,项目名称:AppChooser,代码行数:16,代码来源:FileInfosAdapter.java

示例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);
        }
    });
}
 
开发者ID:JulianAndroid,项目名称:AppChooser,代码行数:11,代码来源:MediaTypesAdapter.java

示例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);
        }
    });
}
 
开发者ID:JulianAndroid,项目名称:AppChooser,代码行数:12,代码来源:ResolversAdapter.java

示例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);
        }
    });
}
 
开发者ID:a371166028,项目名称:likequanmintv,代码行数:16,代码来源:LoveLiveListFragment.java

示例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);
            }
        });
    }
 
开发者ID:a371166028,项目名称:likequanmintv,代码行数:16,代码来源:ColumnFragmentListAdapter.java

示例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);
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:5,代码来源:HistorySearchAdapter.java

示例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());
}
 
开发者ID:gaolhjy,项目名称:cniao5,代码行数:5,代码来源:CategoryAdapter.java

示例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());
}
 
开发者ID:guzhigang001,项目名称:QNewsDemo,代码行数:5,代码来源:MsgSendItemDelagate.java


注:本文中的com.zhy.adapter.recyclerview.base.ViewHolder.setText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。