i have recently developed a list program in android in which there is an edittext through which i enter names. these names get stored in the database and are shown in the list as well. now i want to add a button which when pressed shows a new layout with the names that i have entered in the list. the names displayed must be dynamic i.e if i enter 5 names then only 5 are shown, if i enter 10, 10 are shown and so on. i am very confused on the dynamic array thing.
please help!
thanks a lot!
i have recently developed a list program in android in which there is an
Share
Please be more specific. Do you mean dynamic in layout or dynamic in java? If you mean in layout you could create a container for all the names (for example a linearlayout) you would then in code create each name view (for example textview, this could be done with layoutinflation from a predefined xml resource) and add them to your container.