From Fragment A you can go to Fragment B and complete the fields from Frag B and submits some data.
Fragment A contains some data that has to be sent to the database, also in this fragment there is a variable isFragBCompleted that stores the status of the Fragment B. How can I navigate to Frag B and return to Frag A without losing my data from Frag A?
Not entirely sure what exactly is your whole use case, but I would buy a small, slim and a detachable screen laptop to fit my needs, also it would be way powerful than a tablet
Yes, it's bad, but the fragment right now is only being loaded in MainActivity only
If you look at the second fragment, you would notice that it is highly similar to first fragment, only major differences are in change of view references
Personally, I don't like this approach, I wanted to create some class that handles view generics and I only write code once but I don't understand how to do it
you never need to cast like that unless you directly call functions on your main activity, which you should not do. If you just need the context use requireActivity()
I meant that should I create a separate class that handles the common functionality of these fragments? Like both fragments register a scroll listener on their respective recyclerviews and notify MainActivity