ListView ListView = Activity.getlistview ();
Gets only the list displayed on the current screen, but with the drop-down information, not on the current screen, but the drop-down shows the data is not available or available. Who knows how to get all the data currently included in the dropdown?
That is, a screen shows 7 messages, there are 10, so there will be a drop. But this only gets 7 of the current screen, not 10. How do I get all 10 articles?
I use: Activity.getlistadapter (), although can get 10 data, but the data obtained is set before, not the user click on the changed data, Activity.getlistadapter () is not still need to set something, To get the current data?
Let me summarize it myself:
Method One: Directly to the activity to adapter
ListAdapter listadapter = Activity.getlistadapter ();
The data obtained is not the user's change from the interface, but the initial data that you initially set
Method Two: Get the listview listview = Activity.getlistview ();
And then
for (int i=0;i<listview.getchildcount (); i++) {
View view = Listview.getchildat (i);
。。。。
The data obtained is only on the current interface, not all
Method Three: First get the ListView ListView = Activity.getlistview ();
Then get:
ListAdapter listadapter = Listview.getadapter ();
for (int l=0;l<listadapter.getcount (); l++) {
View view = Listadapter.getview (l, NULL, NULL);
。。。。
This will allow you to get all the data and the latest data
Excerpt from: http://blog.sina.com.cn/s/blog_5da93c8f0100ts84.html
How do I get all the data for the current ListView, including the dropdown?