This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Android and the fly likes ArrayList object not passing to String[] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "ArrayList object not passing to String[] " Watch "ArrayList object not passing to String[] " New topic
Author

ArrayList object not passing to String[]

Tom Mordon
Ranch Hand

Joined: Apr 26, 2012
Posts: 30
When I add items from ArrayList<Item> -> to String[], an object gets passed but when I run the app in the emulator it shows the object as an address of sorts in the ListView. In the debugger it shows the cell to be null. Been stuck on this part as to why its not showing the null value that was passed from the array list to the string[]. This stems from the addItem(String sItem) method. Below is a link to image of the error.








ListActivityDemo.java


Item.java
Tom Mordon
Ranch Hand

Joined: Apr 26, 2012
Posts: 30
Figured it out, needed to use .phrase; instead of toString()
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ArrayList object not passing to String[]
 
Similar Threads
trying to add items dynamically to spinner with alertdialog
How to get the complete path of file from android application
ArrayList says false in emulator
How to check equality of strings ?
Not letting me create and add user defined object to ArrayList