Stack Overflow archive
0 score

Android list setSelection() is not pointing to the correct item

score
0
question views
134
license
CC BY-SA 3.0

If you post some code it would be helpful. However, having had issues with this in the past I know using postDelayed usually fixes it:

java
yourListView.postDelayed(new Runnable() {
    @Override
    public void run() {
        yourListView.setSelection(yourPosition);
    }
}, 50L);

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.