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.
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.
Related
I am trying to create a card deck in the Bumble style (you have a card that you can swipe horizontally and can also scroll vertically to see more photos/info)
My problem is that whilst on iOS this works perfectly fine, in Android the ScrollView inside the PanResponder component seems to take priority on the gesture handling.
I have tried to dynamically change the scrollEnabled on the ScrollView as soon as a horizontal gesture appears, but this did not help.
Any chance you have any solutions?
I have a layout with a linearLayout (top layout) and a listview under this.
What I want to do is like the phone app in Lollipop:
With the scrollbar I can scroll the contact list (top layout doesn't move)
When scroll the list with the finger, first the top layout is scrolling and once it is not visible anymore the listview scroll. When the top layout is visible the scrollbar doesn't move.
Someone has any idea how to do this trick?
What I'm thinking :
I can add the top layout to the header of listview, but the scrollbar take count of the header. And if I scroll with the scrollbar, the top layout will scroll
Trying to set a scrollListener to the listview, and translate the top view, but don't think it will be good and the scrollY is not available for listView
I think I can do something with a scrollView for the root layout, but I know it is not good to put a listview inside a scrollview.
I don't find any proper way to do this kind of feature...
EDIT: To be more clear, I want to translate the listview before I'm able to scroll the listview itself. Problem is when translate listview, the listview height will not expand.
I am also getting this problem in version 5.1 in lower version it's working fine.Try to use in 5.0 As it STABLE verson, also check another scrolling bug in 5.1 in this link here I could not comment so posting this as answer.
In my Android app I have a layout for an activity which consists of a TableLayout on top and one custom ListView below. However, in landscape mode the listview is not completely displayed. So I think I need to add a scrollview to be able to see the full layout.
However, from what I read it is not possible to put a listview inside a scrollview in Android.
What are the alternatives to solve my problem? Thank you so much
I am developing Android application which contains the reading of epub books. In that I need to place two pages in book view. If those pages exceed the screen size user have to scroll and view the books and have to pinch zoom the book and user can pan the book for reading.
At first I tried to place two webview inside the Relativelayout. I can achieve this by placing relativelayout inside the scrollview and horizontal scrollview to scroll in both horizontal and vertical.
But problem occur in the swipping of pages and pinchzoom is not working inside the scrollview; it remains in the first page itself. I don't know where I am going wrong.
Are you putting WebView inside ScrollView? It functions funny that way. You'll have to disable the outside ScrollView if you're doing so.
You can modify ScrollView to be lockable, as in here.
Hi I have a problem with ListView scrolling. My activity layout:
<ScrollView>
<ReleativeLayout>
<ListView>
<... other controls>
When this list view has a lot of elements, so that they do not fit on the screen, I cannot scroll. The interesting part is that the scroll works in landscape orientation, but not in portrait.
Does any one has a suggestion on how to tweak my layout in order to allow scrolling?
Thanks
Do NOT place a listview inside a scrollview, google says it doesnt work, and every time I've tried it brings problems.
Think of this, when you swipe your finger over a the listview, what should scroll, the listview or the scrollview?
You are going to have to rethink that portion of the UI.