Skip to content

Instantly share code, notes, and snippets.

@salihyalcin
Created September 19, 2016 10:54
Show Gist options
  • Save salihyalcin/58b398f671c96fe3380d73244f5a10d1 to your computer and use it in GitHub Desktop.
Save salihyalcin/58b398f671c96fe3380d73244f5a10d1 to your computer and use it in GitHub Desktop.
GetListView all data
void getAllListData(ListView listView){
int count = listView.getAdapter().getCount();
String[] listData = new String[count];
for (int i = 0; i < count; i++) {
listData[i] = listView.getAdapter().getItem(i).toString();
Log.i(TAG, "onClick: " + listData[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment