Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll may fail on PreferenceFragment. #614

Open
GoogleCodeExporter opened this issue Aug 18, 2015 · 1 comment
Open

Scroll may fail on PreferenceFragment. #614

GoogleCodeExporter opened this issue Aug 18, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
Basically in a PreferenceFragment all scrolling fails, i.e. scrollDown, 
scrollToBottom, or implicit scroll by searching.
This is because PreferenceFragment seems to have two ListViews (AbsListView).

This seems to depend on the order that views are returned so it is not easy to 
reproduce.
I don't know what changed, but we started seeng this jsut days ago, it worked 
before.

Debugging Robotium, I see that both views have the same position, the same 
height and the same drawing time.
So when Scroller.scroll calls viewFetcher.getFreshestView, it will return the 
first one.

But there is a difference between them, one has last postion -1 and count 0, 
the other does not.
If viewFetcher.getFreshestView returns the one with count == 0, all scroll 
fails.  If it returns the second one, scroll is fine.

A proposed change is that Scroller.scroll removes AbsListView:s with count == 0 
before calling viewFetcher.getFreshestView.  This makes everything work again.


What version of the product are you using? On what operating system?
5.0 and 5.1 and git latest on OSX 10.9

Original issue reported on code.google.com by [email protected] on 12 Jun 2014 at 9:35

@GoogleCodeExporter
Copy link
Author

Thanks for reporting this. This will be fixed in the next release. 

Original comment by [email protected] on 13 Jun 2014 at 5:29

  • Changed state: Accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant