I use Objects (beans) that we’ll call Category.
These Category objects contain a set of attributes including a list of Category objects.
public class Category {
private List<Category> categoryList;
...
private Strings anAttribute;
}
At compilation, I do not know the depth of the root Category object, meaning : how many Category are in the list of the root Category and how many Category objects are in each one of the list and so go on. I actually get the root Category object by parsing an XML file.
I have an activity, which, to resume, shows a set of buttons. Each button represents a root Category object (each from an XML file). I would like that once I click on one of these buttons, I get a new “window” showing a set of buttons (a button per Category in the List) and each of this button shows recursively a new “window” showing a set of buttons…
How could I do that knowing I’d like to use XML files for the contents I want to display ? I guess the point is not to create an activity per Category (even dynamically).
Thank you for your help.
You could use the following structure: