Answer the question
In order to leave comments, you need to log in
How to pass object between fragments using FragmentResult?
Sending:
binding!!.bClose.setOnClickListener {
val note = Note(title, content, position)
setFragmentResult(
Constants.SAVE_EDIT,
bundleOf(
"keyNote" to note
)
)
activity?.onBackPressed()
}
setFragmentResultListener(Constants.SAVE_EDIT) { key, bundle ->
val note = bundle.getSerializable("keyNote")
}
Answer the question
In order to leave comments, you need to log in
how to be?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question