Android Question A way to reduce the sensitivity of left-right swipes when using ASViewPager and WebView?

Jim2025

Member
I have used the ASViewPager library to swipe left or right, and I have placed a web view on each page. The problem now is that because the web view scrolls the pages it displays down at the same time, if the user moves their finger left and right, the page view goes to the previous or next page. This has made it difficult to work inside the web view. Is there a way to reduce the sensitivity of left and right movements in the page view so that the user can browse the web view more easily?

To explain more precisely, when the user is scrolling up or down or left and right inside the web view, the page will not be swiped left and right.
 
Last edited:

Jim2025

Member
To explain more precisely, when the user is scrolling up or down or left and right inside the web view, the page will not be swiped left and right.
*To be more precise, the PageView should not move left and right when the user is browsing or scrolling the WebView up or down or left and right.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
- ASViewPager1.Scroll = False (disable the swipe)

- Put buttons to move to next/previous pages
 
Last edited:
Upvote 0

Jim2025

Member
I didn't mean to disable or add keys to go left and right, otherwise this could have been done using methods like the ones below:
B4X:
ASViewPager1.AllowNext(False)
ASViewPager1.AllowBack(False)
but I want the swipe action to still be performed, but for example, the ASViewPager should detect that if the user is scrolling up or down or left and right inside the WebView, the page inside the ASViewPager should not move.
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
but I want the swipe action to still be performed, but for example, the ASViewPager should detect that if the user is scrolling up or down or left and right inside the WebView, the page inside the ASViewPager should not move.
And now please tell me how I should recognize in the AS_ViewPager that the user is scrolling in the WebView?

The AS_ViewPager is based on the xCustomListView, there are enough threads in the forum that show that listviews and webviews do not harmonize.

You can also zoom and swipe to the right in the webview, so it's impossible for them to work together.

You can try the following library, this uses native view pager, if it does not work there either, then you have to think of something else to display the webview.
 
Upvote 0

Jim2025

Member
And now please tell me how I should recognize in the AS_ViewPager that the user is scrolling in the WebView?
Maybe with methods like the following?

How can I reduce the touch sensitivity of the screen because when I move up or down even slightly in the web view, the page in the AS_ViewPager also moves to the right or left?
 
Last edited:
Upvote 0
Top