Package io.rong.imkit.base.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)` |
    `<T extends View> T` | `getView(int viewId)` | 通过viewId获取控件
    `View` | `getConvertView()` |
    `ViewHolder` | `setText(int viewId, String text)` | 设置TextView的值
    `ViewHolder` | `setText(int viewId, int text)` |
    `ViewHolder` | `setImageResource(int viewId, int resId)` |
    `ViewHolder` | `setImageBitmap(int viewId, Bitmap bitmap)` |
    `ViewHolder` | `setImageDrawable(int viewId, Drawable drawable)` |
    `ViewHolder` | `setBackgroundColor(int viewId, int color)` |
    `ViewHolder` | `setBackgroundRes(int viewId, int backgroundRes)` |
    `ViewHolder` | `setTextColor(int viewId, int textColor)` |
    `ViewHolder` | `setTextColorRes(int viewId, int textColorRes)` |
    `ViewHolder` | `setAlpha(int viewId, float value)` |
    `ViewHolder` | `setVisible(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` | `setOnClickListener(int viewId, OnClickListener listener)` | 关于事件的
    `ViewHolder` | `setOnTouchListener(int viewId, OnTouchListener listener)` |
    `ViewHolder` | `setOnLongClickListener(int viewId, OnLongClickListener listener)` |

    - ### 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)

    - #### 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, int text)

    - #### setImageResource

           ViewHolder setImageResource(int viewId, int resId)

    - #### setImageBitmap

           ViewHolder setImageBitmap(int viewId, Bitmap bitmap)

    - #### setImageDrawable

           ViewHolder setImageDrawable(int viewId, Drawable drawable)

    - #### setBackgroundColor

           ViewHolder setBackgroundColor(int viewId, int color)

    - #### setBackgroundRes

           ViewHolder setBackgroundRes(int viewId, int backgroundRes)

    - #### setTextColor

           ViewHolder setTextColor(int viewId, int textColor)

    - #### setTextColorRes

           ViewHolder setTextColorRes(int viewId, int textColorRes)

    - #### setAlpha

           ViewHolder setAlpha(int viewId, float value)

    - #### setVisible

           ViewHolder setVisible(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)

    - #### setOnClickListener

           ViewHolder setOnClickListener(int viewId, OnClickListener listener)

      关于事件的

    - #### setOnTouchListener

           ViewHolder setOnTouchListener(int viewId, OnTouchListener listener)

    - #### setOnLongClickListener

           ViewHolder setOnLongClickListener(int viewId, OnLongClickListener listener)