0

I am making an android webview application. However, when the user scrolls off the screen, I want the part I show in the picture not to appear.

How can I do that ? Thank you for your help.

enter image description here

CoinAnalyzer
  • 56
  • 1
  • 6
  • check out my question in [HERE](https://stackoverflow.com/questions/57654466/nestedwebview-working-properly-with-scrollingviewbehavior), you will find in there some clues (especially `ScrollingViewBehavior`) – snachmsm Aug 02 '21 at 09:58
  • @snachmsm I don't know much. Is it that hard to destroy it? – CoinAnalyzer Aug 02 '21 at 10:05
  • what do you mean by "that hard to destroy it"? – snachmsm Aug 02 '21 at 10:19
  • @snachmsm When you scroll up, down or left and right in the application, things like the balloon in the picture appear. I don't want them to come off. Also, how can I disable swiping left and right? – CoinAnalyzer Aug 02 '21 at 10:24
  • you are talking about `Toolbar` or this gray curved shape, so-called overscroll effect, which can be disabled easily with line `webView.setOverScrollMode(View.OVER_SCROLL_NEVER);`? – snachmsm Aug 02 '21 at 10:27
  • @snachmsm Yes. This worked. But can you tell me what exactly it does? Scrolling disabled? (it doesn't look like that) – CoinAnalyzer Aug 02 '21 at 10:35
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/235534/discussion-between-coinanalyzer-and-snachmsm). – CoinAnalyzer Aug 02 '21 at 10:37

1 Answers1

2

for disabling overscroll effect just use

webView.setOverScrollMode(View.OVER_SCROLL_NEVER);

some doc in HERE. this is just some visual effect, which you can have or just disable like you want. it doesn't affecting any scrolling possibility

edit: worth adding that Android 12 changed this behavior, from "glow effect" to "stretch effect". still same way for configuring/disabling it as above

snachmsm
  • 17,866
  • 3
  • 32
  • 74