This is a bit tricky to explain, that's probably the reason why I haven't found any solution on the web so far...
I have a class which contains two variables - a String and a LinkedList of Strings:
String name;
LinkedList<String> stringlist;
stringlist normally holds between 1-4 Strings. Now I would like to create an Activity which shows the content of the objects from this class and shows EditText-fields dynamically, depending on the amount of values in the LinkedList.
I imagine it to look like this when there are 4 values in the list:
Title: <name>
=============
Value: <stringlist[0]>
Value: <stringlist[1]>
Value: <stringlist[2]>
Value: <stringlist[3]>
... and like this if there is only one value:
Title: <name>
=============
Value: <stringlist[0]>
How do I define my layout xml-file to be able to do this? Do I declare my "TextView-EditText-Combination" only once in my layoutfile and in my code to reprint this until it matches stringlist.length() ? Can I somehow do this repetition also for a whole layout-block?