问题标签 [overscroll]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - Overscrollscale: listview remains stretched
The library Overscrollscale modifies the listview
overscroll and makes it bounce at edges. The list is also scaled when user over scrolls it and is scaled back to normal size after the user releases the touch.
Code for scaling the listview
:
Code for onTouchEvent
in ListView
:
The Question:
Sometimes, the list remains stretched even after the touch is released. What could be causing this behaviour?
Stretched list after touch is released:
Apologies for the length of the question, but I thought the code might be of relevance. Any help will be much appreciated!
html - 向上滚动到页面顶部时,如何将导航栏保持在顶部?
在 Safari 和 Mac 版 Chrome 等浏览器中,当您在页面开头尝试向上滚动时,您仍然可以向上滚动一点,但会遇到阻力,并且当您松开时页面会弹回。
我的页面顶部有一个导航栏。当用户向上滚动超过页面顶部时,导航栏会随着页面的其余部分向下移动,如本演示视频中所示。即使在此滚动期间,如何使导航栏保持在页面顶部?
android - 仅当您无法滚动时,如何在 RecyclerView 上禁用过度滚动效果?
背景
有时,用户已经可以看到 recyclerView 的所有项目。
在这种情况下,用户看到过度滚动效果并不重要,因为实际滚动并看到更多项目是不可能的。
问题
我知道为了禁用 RecyclerView 的过度滚动效果,我可以使用:
但我不知道什么时候触发这个,反正滚动是不可能的。
问题
如何确定所有项目都是完全可见的并且用户不能真正滚动?
如果它有助于假设任何事情,我总是将 LinearLayoutManager(垂直和水平)用于 RecyclerView。
android - 在 ListView 中禁用向下滚动
我想禁用 ListView 中的向下过度滚动并覆盖 onOverScrolled 方法。此外,如果我可以检测到用户在其顶部状态下开始滑动时何时尝试顶部过度滚动(我的意思是他在列表视图顶部有一个第一个元素),那将是完美的,因为即使您向上滑动并获得顶部记录,过度滚动也会触发。
android - 使 SwipeRefreshLayout 动画不可见
如果它可能使滑动刷新布局动画完全不可见?我想让整个动画(包括在下拉手势时加载和带箭头的 cricle)消失,但我希望能够使用 onRefresh 函数。也许你知道我可以在我的列表视图中使用的任何替代方案(OnScroll change listener
并且OverScroll
不适用于我触发我的列表视图中的底部 overscoll 并且当列表向上滑动并释放以向上滚动时我不会触发我的功能 - 滑动刷新布局对我来说处理得很好)
更新:根据您的提示,我尝试以多种方式实现(仅使用setEnabled(false)
或同时使用setRefreshing(false)
两者,但在这种情况下,onRefresh 函数根本没有触发。
android - OverScrollDecoratorHelper 从视图中获取 onOverScrollUpdate 回调
我正在使用“me.everything:overscroll-decor-android:1.0.4”。我可以从图像视图中获取偏移值,我试图向下滑动吗?文档说
OverScrollDecoratorHelper.setUpStaticOverScroll(view, OverScrollDecoratorHelper.ORIENTATION_VERTICAL); 我的代码是
但它没有效果,我做错了什么?谢谢!
android - 在 NestedScrollView 中检测过度滚动
我希望在 NestedScrollView 中进行垂直过度滚动以触发我的一种方法,该方法在从另一台设备检索数据时显示 ContentLoadingProgressBar。
SwipeRefreshLayout 小部件在我的应用中看起来不太好,并且似乎没有任何方法可以自定义实际动画(请参阅此问题)。
我已经尝试继承 NestedScrollView 并覆盖 onOverScrolled:
但是,由于手势不是即时的,并且需要一段时间才能完成,因此我的日志消息每次过度滚动都会打印 5-10 次。
我正在寻找一种识别过度滚动手势的方法,以显示我的 ContentLoadingProgressBar 以指示正在刷新数据。
有没有一种很好的、干净的方式来做到这一点?还是我需要处理 onOverScrolled 被多次调用的事实?