UIKit Android v3
UIKit Android
UIKit
Android
Home
/
UIKit
/
Android
This is the new Docs for UIKit v3 for Android. To see the previous Docs, click here.

Customization

In UIKit for Android, the fragment plays the most important role in building the UI of every screen because it creates the module and ViewModel. In each key function, you can customize the corresponding fragment to build a UI that fits your needs. The following list shows the various customization options that Sendbird UIKit provides. Each page shows ChannelFragment in the code as an example but it can be applied to all fragments.


Global custom settings

For custom settings that apply globally to the entire UIKit, the SendbirdUIKit class provides a set of APIs as shown in the following table.

Note: We recommend you to set the following methods when onCreate() of the Application class is called.

MethodDescription

setDefaultThemeMode(ThemeMode)

Sets the basic UIKit theme.

setUseImageCompression(boolean)

Determines whether to compress the image when sending an image file message. This method only applies to the following image types: image/jpg, image/jpeg, and image/png. (Default: false)

setCompressQuality(int)

Sets the value of the compression rate to apply to the image. Acceptable values are 0 to 100, inclusive. (Default: 100)

setResizingSize(Pair<Integer, Integer>)

Sets the new width and height to apply to the image. The given value is shown in the order of the width first, then the height. (Default: 1080x1920)

* When displaying the compressed image as a thumbnail, the value of the new width and height will be halved. The minimum value for the compressed thumbnail is 100x100.

setReplyType(ReplyType)

Sets the reply filter to quote reply mode. (Default: ReplyType.QUOTE_REPLY)

setUseDefaultUserProfile(boolean)

Determines whether to show the default user profile dialog. (Default: false)

setCustomUserListQueryHandler(CustomUserListQueryHandler)

Sets the handler that loads a list of users that the current user can choose from to create a channel with. (Default: query retrieving all users in the application)

setCustomParamsHandler(CustomParamsHandler)

Sets the handler that contains event callback methods to customize the parameters used in specific Chat SDK APIs.

setUIKitFragmentFactory(UIKitFragmentFactory)

Sets the UIKitFragmentFactory to create a fragment in UIKit. This method is only used when a view is created using an activity provided by UIKit for Android.