I have a details Form with multiple textviews (label: field) that are added with a for loop. Is there a way to present some of them as a group in the UI, based on a property? e.g. Personal data or financial data?
Personal
Name: John Doe
Address: Somewhere
Phone: 0000000000
Dates
Reminder: 18/11/2011
DateFrom: 10/11/2011
DateTo: 20/11/2011
thanks in advance
You can create a LinearLayout programatically as:
in this way you can create a new view, which will have a collection of TextViews
EDIT:
If you want to automate process a little more, you may consider setting tags for every TextView using:
and then create groups by adding distinguished TextViews into LinearLayouts using:
String tag = TextView.getTag();