Package io.rong.imkit.widget.adapter

## Class ViewHolder

- All Implemented Interfaces:

      public class ViewHolder

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ViewHolder(Context context, View itemView)` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `static ViewHolder` | `createViewHolder(Context context, View itemView)` |
    `static ViewHolder` | `createViewHolder(Context context, ViewGroup parent, int layoutId)` |
    `Context` | `getContext()` |
    `<T extends View> T` | `getView(int viewId)` | 通过viewId获取控件
    `View` | `getConvertView()` |
    `ViewHolder` | `setText(int viewId, String text)` | 设置TextView的值
    `ViewHolder` | `setText(int viewId, Spannable text)` |
    `ViewHolder` | `setText(int viewId, CharSequence text, BufferType type)` |
    `ViewHolder` | `setImageResource(int viewId, int resId)` |
    `ViewHolder` | `setImageUri(int viewId, Uri uri)` |
    `ViewHolder` | `setImageBitmap(int viewId, Bitmap bitmap)` |
    `ViewHolder` | `setImageBitmapCircle(int viewId, int resId)` |
    `ViewHolder` | `setImageDrawable(int viewId, Drawable drawable)` |
    `ViewHolder` | `setBackgroundColor(int viewId, int color)` |
    `ViewHolder` | `setBackgroundRes(int viewId, int backgroundRes)` |
    `ViewHolder` | `setBackgroundDrawable(int viewId, Drawable drawable)` |
    `ViewHolder` | `setTextColor(int viewId, int textColor)` |
    `ViewHolder` | `setTextColorRes(int viewId, int textColorRes)` |
    `ViewHolder` | `setVisible(int viewId, boolean visible)` |
    `ViewHolder` | `setHoldVisible(int viewId, boolean visible)` |
    `ViewHolder` | `linkify(int viewId)` |
    `ViewHolder` | `setTypeface(Typeface typeface, Array<int> viewIds)` |
    `ViewHolder` | `setProgress(int viewId, int progress)` |
    `ViewHolder` | `setProgress(int viewId, int progress, int max)` |
    `ViewHolder` | `setMax(int viewId, int max)` |
    `ViewHolder` | `setRating(int viewId, float rating)` |
    `ViewHolder` | `setRating(int viewId, float rating, int max)` |
    `ViewHolder` | `setTag(int viewId, Object tag)` |
    `ViewHolder` | `setTag(int viewId, int key, Object tag)` |
    `ViewHolder` | `setChecked(int viewId, boolean checked)` |
    `ViewHolder` | `setSelected(int viewId, boolean selected)` |
    `ViewHolder` | `setOnClickListener(int viewId, OnClickListener listener)` | 关于事件的
    `ViewHolder` | `setOnTouchListener(int viewId, OnTouchListener listener)` |
    `ViewHolder` | `setOnLongClickListener(int viewId, OnLongClickListener listener)` |
    `ViewHolder` | `setPadding(int viewId, int left, int top, int right, int bottom)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ViewHolder

          ViewHolder(Context context, View itemView)

  - ### Method Detail

    - #### createViewHolder

           static ViewHolder createViewHolder(Context context, View itemView)

    - #### createViewHolder

           static ViewHolder createViewHolder(Context context, ViewGroup parent, int layoutId)

    - #### getContext

           Context getContext()

    - #### getView

           <T extends View> T getView(int viewId)

      通过viewId获取控件

    - #### getConvertView

           View getConvertView()

    - #### setText

           ViewHolder setText(int viewId, String text)

      设置TextView的值

    - #### setText

           ViewHolder setText(int viewId, Spannable text)

    - #### setText

           ViewHolder setText(int viewId, CharSequence text, BufferType type)

    - #### setImageResource

           ViewHolder setImageResource(int viewId, int resId)

    - #### setImageUri

           ViewHolder setImageUri(int viewId, Uri uri)

    - #### setImageBitmap

           ViewHolder setImageBitmap(int viewId, Bitmap bitmap)

    - #### setImageBitmapCircle

           ViewHolder setImageBitmapCircle(int viewId, int resId)

    - #### setImageDrawable

           ViewHolder setImageDrawable(int viewId, Drawable drawable)

    - #### setBackgroundColor

           ViewHolder setBackgroundColor(int viewId, int color)

    - #### setBackgroundRes

           ViewHolder setBackgroundRes(int viewId, int backgroundRes)

    - #### setBackgroundDrawable

           ViewHolder setBackgroundDrawable(int viewId, Drawable drawable)

    - #### setTextColor

           ViewHolder setTextColor(int viewId, int textColor)

    - #### setTextColorRes

           ViewHolder setTextColorRes(int viewId, int textColorRes)

    - #### setVisible

           ViewHolder setVisible(int viewId, boolean visible)

    - #### setHoldVisible

           ViewHolder setHoldVisible(int viewId, boolean visible)

    - #### linkify

           ViewHolder linkify(int viewId)

    - #### setTypeface

           ViewHolder setTypeface(Typeface typeface, Array<int> viewIds)

    - #### setProgress

           ViewHolder setProgress(int viewId, int progress)

    - #### setProgress

           ViewHolder setProgress(int viewId, int progress, int max)

    - #### setMax

           ViewHolder setMax(int viewId, int max)

    - #### setRating

           ViewHolder setRating(int viewId, float rating)

    - #### setRating

           ViewHolder setRating(int viewId, float rating, int max)

    - #### setTag

           ViewHolder setTag(int viewId, Object tag)

    - #### setTag

           ViewHolder setTag(int viewId, int key, Object tag)

    - #### setChecked

           ViewHolder setChecked(int viewId, boolean checked)

    - #### setSelected

           ViewHolder setSelected(int viewId, boolean selected)

    - #### setOnClickListener

           ViewHolder setOnClickListener(int viewId, OnClickListener listener)

      关于事件的

    - #### setOnTouchListener

           ViewHolder setOnTouchListener(int viewId, OnTouchListener listener)

    - #### setOnLongClickListener

           ViewHolder setOnLongClickListener(int viewId, OnLongClickListener listener)

    - #### setPadding

           ViewHolder setPadding(int viewId, int left, int top, int right, int bottom)