Hi dear,
Recently I helped another user solve a similar issue, which resulted in this guide.
I’d suggest ignoring the function and looking at how the project works, because it contains logic similar to what you’re asking for to display the data.
Go straight to creating a dictionary with keys matching the values you assigned to the first 8 buttons, and for each key use another dictionary whose keys are the section names and whose values are the final content
it’s a bit cumbersome but it uses RecyclerList, which I consider essential for a modern and smooth app
Each dynamic button must have a unique numberID, so the first layer of categories will be 4 buttons with indexes 1, 2, 3, 4. Then, when you click a category, you’ll delete all the buttons with a for loop and generate the buttons for the sections in that category and so on.
