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;
}
From andrew...@126.com on August 27, 2013 06:26:21
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;
}
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: http://code.google.com/p/robotium/issues/detail?id=508
The text was updated successfully, but these errors were encountered: