My Android app, has around 6 categories. Every category, has 3 sub-categories each, with same name.
So, how can I arrange the categories in a way, to save long lines of codes. That means less number of activities. Here, I am demonstrating my app with a similar example:
Category 1:
- Add
- Edit
- Delete
Category 2:
- Add
- Edit
- Delete
.
.
.
Category 6:
- Add
- Edit
- Delete
So, I do not want to show the sub-categories “Add-Edit-Delete” six times each for 6 categories, I want it to be visible once on the “Main Activity”.
For example,
If I am clicking on “Category 3” - It should ask me on the same activity to “Add or Edit or Delete”. Let’s say, on clicking, “Add”, it should read, “Category 3 - Add” sub-category and rest the procedure goes
on.
I tried with popup-menu, but through this, I have to add “Add-Edit-Delete”, separately for each category with separate UI, which isn’t good.
An example similar to what I want for my categories to work like is the “SitePoint Premium Topics” page.
Any hint or suggestions are welcomed. Thanks!