Package io.rong.imkit.feature.editmessage

## Class EditMessageManager

- All Implemented Interfaces:

      public class EditMessageManager

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `public enum` | `EditMessageManager.ActiveType` |
    `public interface` | `EditMessageManager.StatusListener` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `public final static String` | `TAG` |
    `public boolean` | `isEmoticonMode` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---

  - ### Enum Constant Summary

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

  - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `isEmoticonMode()` |
    `void` | `setEmoticonMode(boolean show)` |
    `static EditMessageManager` | `getInstance()` |
    `void` | `onInit(Context context, String appKey)` |
    `void` | `onAttachedToExtension(Fragment fragment, RongExtension extension)` |
    `void` | `onResumeEditModeResult(EditMessageManager.ActiveType type, EditMessageConfig config)` | 处理恢复编辑状态结果，根据不同的类型 ActiveType 处理不同的逻辑
    `void` | `onDetachedFromExtension()` |
    `void` | `onReceivedMessage(Message message)` |
    `List<IPluginModule>` | `getPluginModules(ConversationType conversationType)` |
    `List<IEmoticonTab>` | `getEmoticonTabs()` |
    `void` | `onDisconnect()` |
    `void` | `activeEditMode(EditMessageManager.ActiveType type, EditMessageConfig config, boolean showKeyBoard)` | 激活编辑消息模式
    `void` | `exitEditMode()` | 退出编辑消息状态，清空编辑消息配置，并获取草稿。
    `void` | `onKeyboardHeightChange(int orientation, boolean isOpen, int keyboardHeight)` |
    `boolean` | `isEditMessageState()` | 是否编辑消息状态
    `EditMessageConfig` | `getEditMessageConfig()` | 是否编辑消息状态
    `void` | `editMessage(EditText editText, OperationCallback callback)` | 修改消息
    `void` | `editMessage(Message message, String editContent)` |
    `void` | `onTextChanged(Context context, ConversationType type, String targetId, int cursorPos, int count, String text)` |
    `void` | `onSendToggleClick(Message message)` |
    `void` | `onDeleteClick(ConversationType type, String targetId, EditText editText, int cursorPos)` |
    `void` | `onDestroy(ConversationType type, String targetId)` |
    `void` | `onPause()` |
    `void` | `onResume()` |
    `void` | `addKeyboardHeightObserver(KeyboardHeightObserver observer)` |
    `void` | `removeKeyboardHeightObserver(KeyboardHeightObserver observer)` |
    `void` | `addMentionBlocks(EditText editText, List<MentionBlock> mentionBlocks)` | RongMentionManager 重新绑定Edittext对应的MentionList。 MentionBlock：“@人名”对应输入框的起始位置。 在RongExtensionViewModel#setEditTextWidget重新绑定Edittext之后，需要调用此接口重新绑定MentionList。
    `void` | `addStatusListener(EditMessageManager.StatusListener listener)` |
    `void` | `removeStatusListener(EditMessageManager.StatusListener listener)` |

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

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

- - ### Constructor Detail

  - ### Method Detail

    - #### isEmoticonMode

           boolean isEmoticonMode()

    - #### setEmoticonMode

           void setEmoticonMode(boolean show)

    - #### getInstance

           static EditMessageManager getInstance()

    - #### onInit

           void onInit(Context context, String appKey)

    - #### onAttachedToExtension

           void onAttachedToExtension(Fragment fragment, RongExtension extension)

    - #### onResumeEditModeResult

           void onResumeEditModeResult(EditMessageManager.ActiveType type, EditMessageConfig config)

      处理恢复编辑状态结果，根据不同的类型 ActiveType 处理不同的逻辑

    - #### onDetachedFromExtension

           void onDetachedFromExtension()

    - #### onReceivedMessage

           void onReceivedMessage(Message message)

    - #### getPluginModules

           List<IPluginModule> getPluginModules(ConversationType conversationType)

    - #### getEmoticonTabs

           List<IEmoticonTab> getEmoticonTabs()

    - #### onDisconnect

           void onDisconnect()

    - #### activeEditMode

           void activeEditMode(EditMessageManager.ActiveType type, EditMessageConfig config, boolean showKeyBoard)

      激活编辑消息模式

      Parameters:
        `type` - 激活类型
        `config` - 编辑消息配置
        `showKeyBoard` - 是否展示软键盘

    - #### exitEditMode

           void exitEditMode()

      退出编辑消息状态，清空编辑消息配置，并获取草稿。

    - #### onKeyboardHeightChange

           void onKeyboardHeightChange(int orientation, boolean isOpen, int keyboardHeight)

    - #### isEditMessageState

           boolean isEditMessageState()

      是否编辑消息状态

    - #### getEditMessageConfig

           EditMessageConfig getEditMessageConfig()

      是否编辑消息状态

    - #### editMessage

           void editMessage(EditText editText, OperationCallback callback)

      修改消息

    - #### editMessage

           void editMessage(Message message, String editContent)

    - #### onTextChanged

           void onTextChanged(Context context, ConversationType type, String targetId, int cursorPos, int count, String text)

    - #### onSendToggleClick

           void onSendToggleClick(Message message)

    - #### onDeleteClick

           void onDeleteClick(ConversationType type, String targetId, EditText editText, int cursorPos)

    - #### onDestroy

           void onDestroy(ConversationType type, String targetId)

    - #### onPause

           void onPause()

    - #### onResume

           void onResume()

    - #### addKeyboardHeightObserver

           void addKeyboardHeightObserver(KeyboardHeightObserver observer)

    - #### removeKeyboardHeightObserver

           void removeKeyboardHeightObserver(KeyboardHeightObserver observer)

    - #### addMentionBlocks

           void addMentionBlocks(EditText editText, List<MentionBlock> mentionBlocks)

      RongMentionManager 重新绑定Edittext对应的MentionList。 MentionBlock：“@人名”对应输入框的起始位置。 在RongExtensionViewModel#setEditTextWidget重新绑定Edittext之后，需要调用此接口重新绑定MentionList。

    - #### addStatusListener

           void addStatusListener(EditMessageManager.StatusListener listener)

    - #### removeStatusListener

           void removeStatusListener(EditMessageManager.StatusListener listener)