I am changing the adapter view . How to implement an setSelection()adapter? What are the steps to take when setSelection()the adapterview method method is called?
setSelection()
I tried looking at the source code ListView's, but that didn't help.
ListView's
Save the selected position and pass it to the BaseAdapter class. (You must implement your own base adapter class).
getView() , == selectedPosition. (: notifyDatasetChange(), getView()).
onItemClick()
listView.setOnItemClickListener(new OnItemClickListener(){ @Override public void onItemClick(AdapterView<?> parent, View v, int position,long id) { } });
this this, -, , ( ), .
Android-HorizontalListView HorizontalListView, Android ListView, . , setSelection() .