Answer the question
In order to leave comments, you need to log in
How to properly navigate through the product catalog?
Here is a small diagram of how I imagine it and do it:
https://gist.github.com/vikewoods/1489433c77ccaf125767
But then the question arises how to correctly transfer data between fragments...
From the manuals, I realized that this should be implemented through the activity, which Fragments cannot communicate with each other directly. In Google, I still didn’t find an example of how to implement navigation for a multi-level catalog ...
I tried through activation, but something didn’t work out because I don’t know how to deal with NavigationDrawer ...
Please explain how to implement it correctly
Forgot to add an application is done only for Android KitKat & Android L (ListView for example can be replaced with RecyclerView if this somehow simplifies the task...)
Answer the question
In order to leave comments, you need to log in
How do you use NavigationDrawer? In theory, it should have a ListView (without any fragments), an adapter is created in the activity, a listener is installed, and add / replace fragments are done through the FragmentManager. If the presence of a fragment in the NavigationDrawer is critical, then what prevents doing this.getActivity().getFragmentManager() in the fragment itself and doing the same replace / add as in the examples when this is done directly in the activity?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question