+ Reply to Thread
Results 1 to 2 of 2

Thread: Android ArrayList

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    28

    Android ArrayList

    I have a ArrayList of String in a different thread , i just need to iterate it , how can i do that ?

  2. #2
    Junior Member
    Join Date
    Feb 2012
    Posts
    19
    Please check the below solution :
    Code:
    final List<Item> items = new ArrayList<Item>();
    items.addAll(stuff);
    new Thread(new Runnable() {
      public void run() {
        for (Item item: items) {
          System.out.println(item);
        }
      }
    }).start();

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts