Note: Don't forget to register the activity in your AndroidManifest.xml
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
MainActivityor make sure that you call
loadData()in your activity
activity_profile.xml. To override this fragment, you will need to subclass it and update the layout file:
ChatActivityyou will also need to define the main activity for your app like this:
ChatActivitythey will be taken to the app's main activity.
ChatActivity. Create a new subclass of the
activity_chatinto it. Make sure you give this layout file a new name like
getLayout()method and provide our custom layout file.
custom_activity_layoutfile and find the section:
CustomChatViewwill be inflated into the
ChatActivityand you can customize it as necessary.