This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding Values from ArrayList<Object> to an EditText field.  RSS feed

 
William Kohus
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Line 11 Gives me the following Error:
Unable to start activity ComponentInfo{bteamdevelopment.contactinformation/bteamdevelopment.contactinformation.ContactActivity}: java.lang.IndexOutOfBoundsException: Invalid index 2, size is 0


I'm able to Toast tvalues in line 13 and it prints each of my values so I know ArrayList<> values has items in it. It's weird because it's telling me it's an invalid index and the size is 0!??


Also, I'm able to print ALL of my results from the ArrayList if I use:
editAddress.setText(values.toString()); - That will populate my (EditText)editAddress with ALL of my values.

I guess my question is how do I pull a SINGLE value from the ArrayList and set it to my EditText?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!