I have a list activity .I have created a array
string []name = new Str开发者_StackOverflow中文版ing[50];
this string is used to populate the list but if i have data only till name[8] and i don't give values to the rest of the array and when i scroll till the end of the list the application force closes
The most simple way would be to have a List<String>
fill it with your names and pass it to the Adapter via toArray
. However this may be not the cheapest way(in a sense of memory requirements).
精彩评论