Usually, the fragments are embedded in the MainActivity. The main activity reloads the fragments when the activity resumes. If you want to use the fragments in your own activity, you should either inherit from MainActivity or make sure that you call loadData() in your activity onResume().
Override the ProfileFragment
The profile fragment is hosted within the profile activity. It is defined withinactivity_profile.xml. To override this fragment, you will need to subclass it and update the layout file:
Replace the standard profile fragment with your custom profile fragment.
Override the ChatActivity
If you are overriding the ChatActivity you will also need to define the main activity for your app like this:
When the user clicks back from the ChatActivity they will be taken to the app's main activity.
Override ChatView
To do this first you need to override the ChatActivity. Create a new subclass of the ChatActivity
Also, make a new xml layout file and copy the contents of activity_chat into it. Make sure you give this layout file a new name like custom_activity_layout
As you can see above, we override the getLayout() method and provide our custom layout file.
After Chat SDK initialization, register this subclass:
Make a new subclass of the ChatView called CustomChatView.
Open your custom_activity_layout file and find the section:
Change this to:
Now the CustomChatView will be inflated into the ChatActivity and you can customize it as necessary.