Customize Chat Features
If you are using the default interface from TapTalk.io UI implementation type, you can choose to enable or disable the available chat features that we provided by using the TapUI class.
By default, TapTalk activities will follow your project's app theme to show/hide action bar in activities, but you can show or hide action bar in TapTalk activities using the following methods:
Java
Kotlin
TapUI.getInstance().setAllTapTalkActivityActionBarEnabled(ENABLED);
TapUI.getInstance().setTapTalkChatActivityActionBarEnabled(ENABLED);
TapUI.getInstance().setAllTapTalkActivityActionBarEnabled(ENABLED)
TapUI.getInstance().setTapTalkChatActivityActionBarEnabled(ENABLED)
Note:
• Calling
setAllTapTalkActivityActionBarEnabled
will enable/disable action bar in all TapTalk activities.• Calling
setTapTalkChatActivityActionBarEnabled
will only enable/disable action bar in TapTalk default chat room (TapUIChatActivity).• Setting
setAllTapTalkActivityActionBarEnabled
to true
and setTapTalkChatActivityActionBarEnabled
to false
will disable action bar in TapTalk default chat room, but enable it in other TapTalk activities, and vice versa.You can choose to enable or disable read status of messages in room list and chat room. When disabled, read messages will show as delivered instead. Read status is enabled by default.
Java
Kotlin
TapUI.getInstance().setReadStatusVisible(VISIBLE);
TapUI.getInstance().setReadStatusVisible(VISIBLE)
You can also choose to enable or disable the user from adding another user as TapTalk contact.
Java
Kotlin
TapUI.getInstance().setAddContactEnabled(ENABLED);
TapUI.getInstance().setAddContactEnabled(ENABLED)
Note: Disabling add contact feature will also hide the following:
• Add to Contacts button in chat room
• Add to Contacts button in user profile
• New Contact button in start new chat page
• Scan QR Code button in start new chat page
The following features in TapTalk default room list can be customized:
• Close Room List Button
• Search Chat
• My Account
• Start New Chat
Java
Kotlin
TapUI.getInstance().setCloseButtonInRoomListVisible(VISIBLE);
TapUI.getInstance().setSearchChatBarInRoomListVisible(VISIBLE);
TapUI.getInstance().setMyAccountButtonInRoomListVisible(VISIBLE);
TapUI.getInstance().setNewChatButtonInRoomListVisible(VISIBLE);
TapUI.getInstance().setCloseButtonInRoomListVisible(VISIBLE)
TapUI.getInstance().setSearchChatBarInRoomListVisible(VISIBLE)
TapUI.getInstance().setMyAccountButtonInRoomListVisible(VISIBLE)
TapUI.getInstance().setNewChatButtonInRoomListVisible(VISIBLE)
The following features in TapTalk default chat room can be customized: