You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
when i use scrollListToBottom ,the API does not work for me
What is the expected output? What do you see instead?
scroll the listview to bottom ,nothing happened
What version of the product are you using? On what operating system?
robotium 4.1 . Mac OSX 10.7.6
when i observe the source code ,i found that when listView.getCount==1 ,the
scrollList will not work
see the source code here:
if (allTheWay) {
scrollListToLine(absListView, absListView.getCount() - 1);
return false;
}
if (absListView.getLastVisiblePosition() >= absListView.getCount() - 1) {
scrollListToLine(absListView,
absListView.getLastVisiblePosition());
return false;
}
if (absListView.getFirstVisiblePosition() != absListView
.getLastVisiblePosition())
scrollListToLine(absListView,
absListView.getLastVisiblePosition());
else
scrollListToLine(absListView,
absListView.getFirstVisiblePosition() + 1);
when getCount==1,then will goto scrollListToLine(absListView, 0),and will not
scroll
m solution:add the following code
if(absListView.getCount() == 1){
absListView.smoothScrollToPosition(1);
}
then the listview can scroll to bottom
would you have some suggestions to deal with this situation??
wish your reply!!thank you!
Original issue reported on code.google.com by [email protected] on 27 Aug 2013 at 1:26
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 27 Aug 2013 at 1:26The text was updated successfully, but these errors were encountered: