I'm in the process of building an Android app, and I have a question about the best structure. I'm using a Navigation Drawer
UI, and it seems that Android pushes for you to use a fragment
for each view associated with the list items in the navigation drawer.
Where that seems to get complex very quickly, is each of my fragments will have a couple of fragments (in the interest of reusability). The fragment interaction listener need to communicate with an Activity
, but the only Activity
I have involved is the one containing my navigation drawer. I don't want to have a lot of listeners linking back to that Activity
- ideally I'd like them to link to their parent fragment.
I haven't done Android development in a while, and I want to make sure I doing this the correct way. Anyone know the best way to handle this?