• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ArrayList object not passing to String[]

 
Tom Mordon
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured it out, needed to use .phrase; instead of toString()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic