I have an expandable listview, and for each child I need to have 4 "extras" or strings or whatever to call it: - childtitle - description - link1 - link2
followed by a tutorial, it was no problem to create the listview, the different parents and the child with 1 string only. i have tried to create a hashmap inside a hashmap, but it didn't quite work. what is a better solution?
public void filldata(){
ArrayList productinfo = new ArrayList<>();
categories = new HashMap<>();
topics = new HashMap<>();
categories.add("FITNESS"); //This would be the parent title
categories.add("MONEY");
List<String> Fitness=new ArrayList<>();
List<String> Money=new ArrayList<>();
Fitness.add("Product1"); // this would be child1
List<String> Product1=new ArrayList<>();
Product1.add("desc1"); //this would be the description of child 1
Product1.add("link1.1");//this would be the link1 of child 1
Product1.add("link1.2");//this would be the link2 of child 1
Fitness.add("Product2"); //child2
Fitness.add("Product3"); //child3
Money.add("Product1"); //child 1
Money.add("Product2"); // " 2
Money.add("Product3"); // " 3
topics.put(categories.put(productinfo.get(0),Fitness)); //doesn't seem to work like this
categories.put(productinfo.get(1),Money);
}