I have a simple custom adapter. I need to set the starting position to different positions at different times. When using a standard listadapter, I can simply use myCursor.moveToPosition( i ). A custom adapter using getview does not work that way. Can anyone tell me how to move the current list to the position I want?
A:
If your ListView is available, use: getListView().setSelection( i );
(or myListView.setSelection(i);
)
You can also get the current position (to return to in onResume, perhaps) by using:
int myPosition = getListView().getFirstVisiblePosition();
HXCaine
2010-05-24 10:42:28