Package io.rong.imkit.conversation

## Class ConversationFragment

- All Implemented Interfaces:

      public class ConversationFragment

  Author:

    lvz

- - ### Nested Class Summary

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

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public final static int` | `REQUEST_CODE_FORWARD` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConversationFragment()` |

  - ### Enum Constant Summary

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

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `initConversation(String targetId, ConversationType conversationType, Bundle bundle)` |
    `void` | `onViewClick(int clickType, UiMessage data)` |
    `boolean` | `onViewLongClick(int clickType, UiMessage data)` |
    `LinearLayout` | `getNotificationContainer()` | 获取顶部通知栏容器
    `void` | `hideNotificationView(View notificationView)` | 隐藏调用showNotificationView所显示的通知view
    `void` | `showNotificationView(View notificationView)` | 在通知区域显示一个view
    `boolean` | `onBackPressed()` |
    `void` | `onRefresh(RefreshLayout refreshLayout)` |
    `RongExtension` | `getRongExtension()` |
    `void` | `onActivityResult(int requestCode, int resultCode, Intent data)` |
    `void` | `onRequestPermissionsResult(int requestCode, Array<String> permissions, Array<int> grantResults)` |
    `View` | `onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)` | findId，绑定监听
    `void` | `onViewCreated(View view, Bundle savedInstanceState)` |
    `void` | `onResume()` |
    `void` | `onPause()` |
    `void` | `onStart()` |
    `void` | `onStop()` |
    `void` | `onDestroyView()` |
    `void` | `onClick(View v)` |
    `void` | `onLoadMore(RefreshLayout refreshLayout)` |
    `void` | `onWarningDialog(String msg)` | 提示dialog.
    `void` | `addHeaderView(View view)` |
    `void` | `addFooterView(View view)` |
    `void` | `setEmptyView(View view)` |
    `void` | `setEmptyView(int emptyId)` |

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

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

- - ### Constructor Detail

    - #### ConversationFragment

          ConversationFragment()

  - ### Method Detail

    - #### initConversation

           void initConversation(String targetId, ConversationType conversationType, Bundle bundle)

    - #### onViewClick

           void onViewClick(int clickType, UiMessage data)

    - #### onViewLongClick

           boolean onViewLongClick(int clickType, UiMessage data)

    - #### getNotificationContainer

           LinearLayout getNotificationContainer()

      获取顶部通知栏容器

      Returns:

        通知栏容器

    - #### hideNotificationView

           void hideNotificationView(View notificationView)

      隐藏调用showNotificationView所显示的通知view

      Parameters:
        `notificationView` - 通知栏 view

    - #### showNotificationView

           void showNotificationView(View notificationView)

      在通知区域显示一个view

    - #### onBackPressed

           boolean onBackPressed()

    - #### onRefresh

           void onRefresh(RefreshLayout refreshLayout)

    - #### getRongExtension

           RongExtension getRongExtension()

    - #### onActivityResult

           void onActivityResult(int requestCode, int resultCode, Intent data)

    - #### onRequestPermissionsResult

           void onRequestPermissionsResult(int requestCode, Array<String> permissions, Array<int> grantResults)

    - #### onCreateView

           View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)

      findId，绑定监听

    - #### onViewCreated

           void onViewCreated(View view, Bundle savedInstanceState)

    - #### onResume

           void onResume()

    - #### onPause

           void onPause()

    - #### onStart

           void onStart()

    - #### onStop

           void onStop()

    - #### onDestroyView

           void onDestroyView()

    - #### onClick

           void onClick(View v)

    - #### onLoadMore

           void onLoadMore(RefreshLayout refreshLayout)

    - #### onWarningDialog

           void onWarningDialog(String msg)

      提示dialog. 例如"加入聊天室失败"的dialog 用户自定义此dialog的步骤: 1.定义一个类继承自 ConversationFragment 2.重写 onWarningDialog

      Parameters:
        `msg` - dialog 提示

    - #### addHeaderView

           void addHeaderView(View view)

      Parameters:
        `view` - 自定义列表 header view

    - #### addFooterView

           void addFooterView(View view)

      Parameters:
        `view` - 自定义列表 footer view

    - #### setEmptyView

           void setEmptyView(View view)

      Parameters:
        `view` - 自定义列表 空数据 view

    - #### setEmptyView

           void setEmptyView(int emptyId)

      Parameters:
        `emptyId` - 自定义列表 空数据的 LayoutId