UIKit Android v3
UIKit Android
UIKit
Android
Home
/
UIKit
/
Android
This is the new Docs for UIKit v3 beta for Android. To see the previous Docs, click here.
The ViewModel
updates and manages APIs used in the fragment. It communicates with Sendbird Chat SDK to receive necessary data. If you wish to customize these data and implement new APIs, you can do so through the ViewModel
.
Note: The
ViewModel
ofChannelFragment
is used as an example in the codes below to show how to customize it but you can replace it with any otherViewModel
in UIKit.
- You can add or override new methods by inheriting
ChannelViewModel
.
- Create
CustomChannelViewModel
throughViewModelFactory
.
- Create a custom
ViewModel
by overriding theonCreateViewModel()
method of the custom fragment.
You can use the newly customized ViewModel
by calling the getViewModel()
method of the custom fragment.