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")
}
как быть?