I am writing a custom adapter for use with a ListView
.
The Adapter
interface includes a getItem()
method which returns, according to the docs, an Object
as
the data item associated with the specified position in the data set.
What's this object supposed to be? I can only imagine the ListView
wants to call either toString
or equals
on it, since there's not much else you can do with a raw Object
. But I don't have a convenient Object
I can return, and in any event I'm overriding getView
so the ListView has no need for a String from my dataset anyway.
Can I just return null
or something else completely irrelevant?