LiveUIKitFragmentFactory is a class that provides and manages all fragments used in Sendbird UIKit. While an activity creates the basic UI screen and allows the user to navigate between different screens, the fragment within the activity is what allows you to customize components and manage data. The
LiveUIKitFragmentFactory class creates the fragment used in each activity.
If you wish to customize a fragment, you need to inherit the
LiveUIKitFragmentFactory class and override the method that creates the fragment. Then, you must return the customized fragment in order to apply the customization throughout the UIKit. Before creating the fragment, you need to also send data from the activity to the customized fragment through the
Bundle class. The fragment will then use the data to build a view.
Note: If you're only using fragments to build a screen in the UIKit instead of using an activity, you can skip the following steps.
- You need to first override the methods of the fragment you wish to customize by inheriting the
LiveUIKitFragmentFactoryclass. Refer to the code below as an example.
- Apply the customized