开发者

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().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜