Chat UIKit Android View v3
Chat UIKit Android View
Chat UIKit
Android View
Version 3

Customize chat input menu

Copy link

The UIKit's default input menu offers functionalities such as taking photos, recording videos, accessing the photo library, and selecting files. To customize the input menu, redefine the menu's click events as shown below.


Receive menu click events through builder

Copy link

The fragment's builder provides an interface to listen for the click event. You can set it up in the UIKit by creating a fragment through builder.

ChannelFragment.Builder(channelUrl)
    .setOnInputLeftButtonClickListener {
        // Show your custom menus.
    }
    .build()

Receive menu click events through custom fragment

Copy link

By default, when the input menu button is clicked, the showMediaSelectDialog method is called. You can override this function and set up a custom menu action.

class InputMenuSampleFragment : ChannelFragment() {
    override fun showMediaSelectDialog() {
        // Show your custom menus.
    }
}

For an in-depth practical demonstration, see our sample code.