# 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)
getContext
Link copied to clipboard
public Context getContext()
getConvertView
Link copied to clipboard
public View getConvertView()
getView
Link copied to clipboard
public T getView<T extends View>(int viewId)
通过viewId获取控件
linkify
Link copied to clipboard
public ViewHolder linkify(int viewId)
setBackgroundColor
Link copied to clipboard
public ViewHolder setBackgroundColor(int viewId, int color)
setBackgroundDrawable
Link copied to clipboard
public ViewHolder setBackgroundDrawable(int viewId, Drawable drawable)
setBackgroundRes
Link copied to clipboard
public ViewHolder setBackgroundRes(int viewId, int backgroundRes)
setChecked
Link copied to clipboard
public ViewHolder setChecked(int viewId, boolean checked)
setHoldVisible
Link copied to clipboard
public ViewHolder setHoldVisible(int viewId, boolean visible)
setImageBitmap
Link copied to clipboard
public ViewHolder setImageBitmap(int viewId, Bitmap bitmap)
setImageBitmapCircle
Link copied to clipboard
public ViewHolder setImageBitmapCircle(int viewId, int resId)
setImageDrawable
Link copied to clipboard
public ViewHolder setImageDrawable(int viewId, Drawable drawable)
setImageResource
Link copied to clipboard
public ViewHolder setImageResource(int viewId, int resId)
setImageUri
Link copied to clipboard
public ViewHolder setImageUri(int viewId, Uri uri)
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)
setPadding
Link copied to clipboard
public ViewHolder setPadding(int viewId, int left, int top, int right, int bottom)
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)
setSelected
Link copied to clipboard
public ViewHolder setSelected(int viewId, boolean selected)
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, Spannable text)
public ViewHolder setText(int viewId, CharSequence text, BufferType type)
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)