Android - Activity with Fragment contact method - FragmentResultListener

Activity 跟Fragment 溝通方式

Activity

    private inner class FastReplyFragmentResultListener() : FragmentResultListener {
        override fun onFragmentResult(requestKey: String, result: Bundle) {

			//TODO
        }
    }

fragment

 parentFragmentManager.setFragmentResult(
            REQUEST_KEY,
            bundleOf(UNREAD_COUNT to unreadCount)
        )