android ListView question
I have a ListView in my android application. If I flick up/down the ListView, which method will return my 'selected' element in my list View? 开发者_开发知识库 How about if I use the track ball to navigate up/down my list view, which method will return the index of my selected element?
Thank you.
If I flick up/down the ListView, which method will return my 'selected' element in my list View?
None will, because selection is only through the trackball/D-pad.
How about if I use the track ball to navigate up/down my list view, which method will return the index of my selected element?
getSelectedItem()
, getSelectedItemId()
(for CursorAdapter
), and getSelectedItemPosition()
.
精彩评论