I'm having weird issues calling getSelectedItem()
in my onDraw()
function in my extended Gallery
class. For some reason it gives me an Integer
back when i'm expecting my own object. When i debug and look in the adapter it shows that it's filled with my objects. Any idea why it isn't returning what i expect?
Edit : It looks like it's returning the index.
Edit : Go figure, bad code on my part. In my adapter i did the following:
@Override
public Object getItem(int position) {
return position;
}