# ViewHolder

public class ViewHolder

**以下为辅助方法

## Constructors

ViewHolder
Link copied to clipboard
public void ViewHolder(Context context, View itemView)

## Functions

createViewHolder
Link copied to clipboard
public static ViewHolder createViewHolder(Context context, View itemView)
public static ViewHolder createViewHolder(Context context, ViewGroup parent, int layoutId)
getConvertView
Link copied to clipboard
public View getConvertView()
getString
Link copied to clipboard
public String getString(int resId)
getView
Link copied to clipboard
public T getView<T extends View>(int viewId)
通过viewId获取控件
linkify
Link copied to clipboard
public ViewHolder linkify(int viewId)
setAlpha
Link copied to clipboard
public ViewHolder setAlpha(int viewId, float value)
setBackgroundColor
Link copied to clipboard
public ViewHolder setBackgroundColor(int viewId, int color)
setBackgroundRes
Link copied to clipboard
public ViewHolder setBackgroundRes(int viewId, int backgroundRes)
setChecked
Link copied to clipboard
public ViewHolder setChecked(int viewId, boolean checked)
setImageBitmap
Link copied to clipboard
public ViewHolder setImageBitmap(int viewId, Bitmap bitmap)
setImageDrawable
Link copied to clipboard
public ViewHolder setImageDrawable(int viewId, Drawable drawable)
setImageResource
Link copied to clipboard
public ViewHolder setImageResource(int viewId, int resId)
setMax
Link copied to clipboard
public ViewHolder setMax(int viewId, int max)
setOnClickListener
Link copied to clipboard
public ViewHolder setOnClickListener(int viewId, OnClickListener listener)
关于事件的
setOnLongClickListener
Link copied to clipboard
public ViewHolder setOnLongClickListener(int viewId, OnLongClickListener listener)
setOnTouchListener
Link copied to clipboard
public ViewHolder setOnTouchListener(int viewId, OnTouchListener listener)
setProgress
Link copied to clipboard
public ViewHolder setProgress(int viewId, int progress)
public ViewHolder setProgress(int viewId, int progress, int max)
setRating
Link copied to clipboard
public ViewHolder setRating(int viewId, float rating)
public ViewHolder setRating(int viewId, float rating, int max)
setTag
Link copied to clipboard
public ViewHolder setTag(int viewId, Object tag)
public ViewHolder setTag(int viewId, int key, Object tag)
setText
Link copied to clipboard
public ViewHolder setText(int viewId, int text)
public ViewHolder setText(int viewId, String text)
设置TextView的值
setTextColor
Link copied to clipboard
public ViewHolder setTextColor(int viewId, int textColor)
setTextColorRes
Link copied to clipboard
public ViewHolder setTextColorRes(int viewId, int textColorRes)
setTypeface
Link copied to clipboard
public ViewHolder setTypeface(Typeface typeface, Array<int> viewIds)
setVisible
Link copied to clipboard
public ViewHolder setVisible(int viewId, boolean visible)