I am able to add strings at run time in ListView. But I am only getting the last string data in the ListView. What is the cause of it? Here is my code.
for (GraphUser user : users) {
ArrayList<String> arr = new ArrayList<String>(Arrays.asList(user.getName()));
ArrayAdapter<String> str = new ArrayAdapter<String>(getBaseContext(), android.R.layout.simple_list_item_1,arr);
lv.setAdapter(str);
str.setNotifyOnChange(true);
}