I know this question is asked several times before but my situation is bit different from other questions.
I have a listview and initially i want to set the scroll position to the bottom of the list.
I have try 2 ways.
1st one
mCommentListView.setSelection(mAdaptor.getCount()-1);
2nd one
mCommentListView.post(new Runnable() {
@Override
public void run() {
mCommentListView.setSelection(mAdaptor.getCount()-1);
}
});
So my problem is both of above code working properly with the emulator but it is not working with the real device.
What have i missed?
mCommentListView.setSelection(mCommentListView.getCount() - 1);
– AbbatialmCommentListView.setSelection(5);
– Abbatial