• Post Reply Bookmark Topic Watch Topic
  • New Topic

listView.getItemAtPosition(position).toString() returns hexadecimal value ?  RSS feed

 
AhFai Chan
Ranch Hand
Posts: 81
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I get the project name from a ListView?

Debugger output
this = {ListProjectsActivity@3883}
listView = {ListView@3885} "android.widget.ListView{241ddba1 VFED.VC. .F.P.... 0,0-768,1134 #102000a android:id/list}"
itemView = {TextView@3899} "android.widget.TextView{19f8239b V.ED.... ........ 0,50-768,146 #1020014 android:id/text1}"
position = 1
id = 3
projectname = "android.database.sqlite.SQLiteCursor@3e23ef11"
toast = {Toast@3964}
intent = {Intent@3995} "Intent { cmp=com.swpwr.builders.swpwrassetlocation/.ListDeliveriesActivity }"

Screenshot:
ITEM-position.jpg
[Thumbnail for ITEM-position.jpg]
Screenshot
 
AhFai Chan
Ranch Hand
Posts: 81
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved.

I forgot to override toString()

Sorry for bother.
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done noticing that
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!