I\'m new to android. I want to pass bitmap into Bundle. But I can\'t find any solution for it. Actually, I\'m confused. I want to display an image in a Dialog fragment. But I do
if you are using NavigationComponent
, you should use safeArgs
!
you can put arguments in nav_graph
like this :
and send it like it : (First Fragment)
findNavController().navigate(SettingFragmentDirections.actionSettingFragmentToHomeFragment(bitmap))
and give it like this : (Second Fragment)
val bitmapimage =
arguments?.getParcelable("profileImage")
user_profile_img.setImageBitmap(bitmapimage)
read more : https://developer.android.com/guide/navigation/navigation-pass-data