The correct structure of the Android application with a navigation box

I am developing an application for Android, and I have a question about the best structure. I use the user interface Navigation Drawer, and it seems that Android is pushing you to use fragmentfor each view associated with the list items in the navigation box.

If this seems very complicated, each of my fragments will have multiple fragments (in the interest of reuse). The listener for fragment interaction needs to exchange data with Activity, but the only one ActivityI used is the one that contains my navigation box. I don’t want many listeners to get involved with this Activity- ideally, I would like them to refer to their parent fragment.

I was not developing Android at the time, and I want to make sure that I am doing it right. Does anyone know a better way to handle this?

+4
source share
1 answer

, . , . . , , . getChildFragmentManager(), .

, - , : fooobar.com/questions/957491/....


, , , :

- , , .

, : fooobar.com/questions/39617/....

, , , , .

0

Source: https://habr.com/ru/post/1533780/


All Articles