Java Code Examples for com.coorchice.library.SuperTextView#setText()

The following examples show how to use com.coorchice.library.SuperTextView#setText() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Type2Adapter.java    From MultiTypeRecyclerViewAdapter with Apache License 2.0 5 votes vote down vote up
@Override
protected void convert(BaseViewHolder helper, ItemEntity2 item) {
    helper.setImageResource(R.id.item_2_img, item.getImg());
    helper.setText(R.id.item_2_title, item.getTitle());
    helper.setText(R.id.item_2_content, item.getContent());
    helper.setText(R.id.item_2_price, item.getPrice());
    LinearLayout tagParent = helper.getView(R.id.item_2_tags);
    tagParent.removeAllViews();
    List<String> tags = item.getTags();
    for (String tag : tags) {
        SuperTextView view = (SuperTextView) mLayoutInflater.inflate(R.layout.label_tag, tagParent, false);
        view.setText(tag);
        tagParent.addView(view);
    }
}
 
Example 2
Source File: MyHelperAdapter.java    From MultiTypeRecyclerViewAdapter with Apache License 2.0 5 votes vote down vote up
private void renderEntity2(BaseViewHolder helper, ItemEntity2 item) {
    helper.setImageResource(R.id.item_2_img, item.getImg());
    helper.setText(R.id.item_2_title, item.getTitle());
    helper.setText(R.id.item_2_content, item.getContent());
    helper.setText(R.id.item_2_price, item.getPrice());
    LinearLayout tagParent = helper.getView(R.id.item_2_tags);
    tagParent.removeAllViews();
    List<String> tags = item.getTags();
    for (String tag : tags) {
        SuperTextView view = (SuperTextView) mLayoutInflater.inflate(R.layout.label_tag, tagParent, false);
        view.setText(tag);
        tagParent.addView(view);
    }
}
 
Example 3
Source File: HeadAdapter.java    From MultiTypeRecyclerViewAdapter with Apache License 2.0 4 votes vote down vote up
@Override
public void onBindViewHolder(BaseViewHolder holder, int position) {
    SuperTextView item = holder.getView(R.id.item_head_home);
    item.setText(sTitles[position]);
    item.setDrawable(sImgs[position]);
}