开发者

How to separate data from the arraylist and display it in to the listview?

开发者 https://www.devze.com 2023-04-01 06:08 出处:网络
In one of my application i got the arraylist like below: [android_metadata, test1, test10, test1002, test2, test3, test4, test5]

In one of my application i got the arraylist like below:

[android_metadata, test1, test10, test1002, test2, test3, test4, test5]
开发者_Go百科

Now i want to separate all the data. and display it in to list view. How it can be done? I want some code to implement it and display it in to listview in android.

Thanks.


Array List has a method called size() and get(Index number)

  1. ArrayList al = new ArrayList();
  2. al.sze(); // to get size of array list
  3. String item1 = al.get(index number); // to get the elemnet of array list

go to this link for more detail ---> array list knowledge

0

精彩评论

暂无评论...
验证码 换一张
取 消