Good day. I’ve copied on stackoverflow a link to the NavigationDrawer menu, read it and attached it to my application. In the code, when I clicked on the menu item, I found the code (at the very bottom of the page is the full MainActivity code) and this is what puzzled:
case 0: fragment = new HomeFragment(); break; case 1: fragment = new FindPeopleFragment(); break; continued in the same vein. So, when you click on an item, a fragment of the corresponding list item is displayed on the application screen. What then will be the structure of the program? Those. Are there fragments everywhere? Is it possible to somehow do without these fragments, so that when you click on a list item, create a new Activity with the necessary content?