2

In my app, I have a ViewPager which contains 4 pages. The root element of two of those pages is a ScrollView. My problem is that I can perfectly scroll the ScrollView on my 4.2 Android Phone, but on my 2.3 Android Phone I can't.

So inside the ScrolView there are cliclable Views... I can click on them, but if I move my finger on it up and down the ScrollView doesn't gets scrolled. If I move my finger on the screen where there is only the ScrollView, it scrolls. Why is this? If I simply use the ScrollView layout without the ViewPager around it, the scrolling works perfectly on a 2.x and also on a 4.x Android Phone.

1
  • It's because ViewPager has it's own implementation of scrolling behaviour where as ScrollView has it's own. Now when you put one Scrollable View into another scrollable view childview's scroll implementation will conflict with parent view. That's why you are seeing this behaviour. Commented Dec 7, 2013 at 17:22

1 Answer 1

1

Actually it was my fault. The simple ScrollView works perfectly inside a ViewPager. I have a ListView inside another ViewPager and there I had to make some tricks to make the ListView works, and from this I thought that I have to make the same tricks with the ScrollView too. But I didn't, and that was the problem.

Sign up to request clarification or add additional context in comments.

4 Comments

Could you explain better what you did? Thx
Could you explain better, please? I'm facing an issue where I cannot scroll my ScrollView inside my ViewPager, would be great to get any help, cheers
I'm also facing the same problem. Could you please let us know how you did @ffddani
I'm also facing a similar problem - works on API 17 but not on 16. @ffddani please let us know what you did.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.