Having issues working with a few fragments.
Writing all this kotlin.
I have a MainActivity (Single Activity App). I'm trying to get the parent fragment to communicate a string to the child fragments. When following this tutorial it just loops continuously. Any other solution I've come across just results in a null pointer exception.
Basic communication between two fragments
I'm using android components navigation also, btw.
In addition I have to then while using that string send list of objects back to the parent fragment from the child fragments.
Any suggestions?
EDIT:
clarification, I am running a fragment in bottom nav enviornment that is the parent frag. Then, inside that parent frag is a view pager with a tablayout to switch between fragments. Within those fragments I am trying to add data to a list using a fab button and an alert dialog. Everything works in the individual fragments it's the data sharing is what I'm struggling with. I have not tried the bundle yet as I wasn't sure it would work. I'll give it a try though.