class MainActivity : AppCompatActivity(), IRecentChatItemClickListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val recentChatFragment = AmityRecentChatFragment.newInstance()
/**
* set the listener to override recentItem click event
* No Need to implement [IRecentChatClickListener] if you don't want to override click event
*/
.recentChatItemClickListener(this)
.build(this)
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, recentChatFragment)
transaction.addToBackStack(null)
transaction.commit()
}
}
Feature
Description
Recent chat list
User can see a list of the most recent chats
Navigation to Message list
When a user clicks a chat, UIKit opens a chatroom page