In this example we use ArrayAdpater and Fragment. In java folder has:
-
Adapter (Package)
- ImageAndString
- ImageAndStringArrayAdapter
-
Fragments (Package)
- Cashiers
- Drinks
- Foods
-
MainActivity
In folder res->
- layout:
- activity_main.xml (It is the container that contain fragmentContainer(framelayout: for view the small activity like activity_caheis) and nav_view(view the bottom))
- activity_cashiers.xml (It is a layout that grid for contain item)
- activity_drinks.xml (It is a layout that grid for contain item)
- activity_foods.xml (It is a layout that grid for contain item)
- grid_item.xml (It is the frameLayout that has image and text than the item use it and then store it in the grid container like activity_cashiers.xml,activity_drinks.xml,activity_foods.xml)