How would I go about creating a simple list view with subcategories? I'm a web dev and while I love the Android Studio drag-and-drop UI styling, I have no idea how to create a simple feature.

This is what I am trying to do:

 * One screen will allow me to add or delete a category.
 * Each category can have multiple subcategories that are hidden and are only shown when the category is tapped, which should also be added when creating/modifying a category.
 * These appear in a list view style, from top to bottom on the main window.


As a bonus question, I want this to be connected to a server's database. What would I need to look into for that? 