Android:To set an item as selected when the ListView opens? -
an activity has button , listview. initially, button visible. when button pressed, listview displayed. when displayed, possible me show 1 particular item selected/focussed?
a use case suppose list of language settings , when list opens, selected language must shown highlighted.
if know index of item, how set focused on display?
in short, listview::setselection(int position) need. however, depending on whether device in touch mode or not, may or may not have visual effect (background highlighting). more details, refer android listview selection problem
Comments
Post a Comment