my dog learned polymorphism
The moose likes Android and the fly likes ArrayList object not passing to String[] Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Android
Reply 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
How to check equality of strings ?
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
Not letting me create and add user defined object to ArrayList