Class RongExtension
-
- All Implemented Interfaces:
public class RongExtension
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumRongExtension.ContainerType
-
Constructor Summary
Constructors Constructor Description RongExtension(Context context)RongExtension constructor. RongExtension(Context context, AttributeSet attrs)RongExtension constructor.
-
Method Summary
Modifier and Type Method Description voidbindToConversation(Fragment fragment, ChannelIdentifier conversationIdentifier, boolean disableSystemEmoji)voidonResume()Lifecycle callback when ChannelFragment onResume() is called. voidonPause()voidsetAttachedInfo(View view)RelativeLayoutgetContainer(RongExtension.ContainerType type)Gets the container for each component of the extension. InputPanelgetInputPanel()PluginBoardgetPluginBoard()EmoticonBoardgetEmoticonBoard()voidresetToDefaultView()voidresetToDefaultView(String conversationType)voidresetToDefaultView(String conversationType, InputMode mode, boolean forceShowKeyBoard)voidupdateInputMode(InputMode inputMode)voidupdateInputMode(InputMode inputMode, boolean forceShowKeyBoard)voidcollapseExtension()Collapse the panel. voidaddPluginPager(View v)Adds a custom view to the plugin area. EditTextgetInputEditText()ChannelTypegetConversationType()Gets the channel type of the current conversation where the Extension resides. StringgetTargetId()Gets the targetId of the current conversation. ChannelIdentifiergetConversationIdentifier()ChannelIdentifiergetChannelIdentifier()voidrequestPermissionForPluginResult(Array<String> permissions, int requestCode, IPluginModule pluginModule)booleanonRequestPermissionResult(int requestCode, Array<String> permissions, Array<int> grantResults)voidstartActivityForPluginResult(Intent intent, int requestCode, IPluginModule pluginModule)voidonActivityPluginResult(int requestCode, int resultCode, Intent data)Called when an activity finishes and returns a result. voidonDestroy()booleanuseKeyboardHeightProvider()-
-
Method Detail
-
bindToConversation
void bindToConversation(Fragment fragment, ChannelIdentifier conversationIdentifier, boolean disableSystemEmoji)
-
onResume
void onResume()
Lifecycle callback when ChannelFragment onResume() is called.
-
onPause
void onPause()
-
setAttachedInfo
void setAttachedInfo(View view)
-
getContainer
RelativeLayout getContainer(RongExtension.ContainerType type)
Gets the container for each component of the extension.
- Parameters:
type- Container type.- Returns:
The container.
-
getInputPanel
InputPanel getInputPanel()
-
getPluginBoard
PluginBoard getPluginBoard()
-
getEmoticonBoard
EmoticonBoard getEmoticonBoard()
-
resetToDefaultView
void resetToDefaultView()
-
resetToDefaultView
void resetToDefaultView(String conversationType)
-
resetToDefaultView
void resetToDefaultView(String conversationType, InputMode mode, boolean forceShowKeyBoard)
-
updateInputMode
void updateInputMode(InputMode inputMode)
-
updateInputMode
void updateInputMode(InputMode inputMode, boolean forceShowKeyBoard)
-
collapseExtension
void collapseExtension()
Collapse the panel. Kept for backward compatibility. Prefer using the ViewModel method.
-
addPluginPager
void addPluginPager(View v)
Adds a custom view to the plugin area. After adding, the "+" area is entirely filled with the custom view. When the custom view is visible, tapping "+" toggles between the custom view and the default plugin panel.
- Parameters:
v- Custom view.
-
getInputEditText
EditText getInputEditText()
-
getConversationType
ChannelType getConversationType()
Gets the channel type of the current conversation where the Extension resides.
- Returns:
Channel type.
-
getTargetId
String getTargetId()
Gets the targetId of the current conversation.
- Returns:
Target ID.
-
getConversationIdentifier
ChannelIdentifier getConversationIdentifier()
-
getChannelIdentifier
ChannelIdentifier getChannelIdentifier()
-
requestPermissionForPluginResult
void requestPermissionForPluginResult(Array<String> permissions, int requestCode, IPluginModule pluginModule)
-
onRequestPermissionResult
boolean onRequestPermissionResult(int requestCode, Array<String> permissions, Array<int> grantResults)
-
startActivityForPluginResult
void startActivityForPluginResult(Intent intent, int requestCode, IPluginModule pluginModule)
- Parameters:
intent- The intent to start.requestCode-If >= 0, this code will be returned in onActivityResult() when the activity exits.
-
onActivityPluginResult
void onActivityPluginResult(int requestCode, int resultCode, Intent data)
Called when an activity finishes and returns a result.
-
onDestroy
void onDestroy()
-
useKeyboardHeightProvider
boolean useKeyboardHeightProvider()
-
-
-
-