In my android application I want simple list which should be initially blank when I add item it would my root list item. Further, when I add more item in that list it all should be under that root list item and it should keep number of item added under that root list .
How can I achieve this?
Have a look this answer listView dynamic add item
In this code we are add data at run time.
first of all we set the an empty adapter to listview after that at run time we add the new item on button click