在 Android 开发者网站上讨论 AppWidgets 的部分中,有一段文字说 AppWidgets 唯一可用的手势是触摸和垂直滑动 ( link) :
Because widgets live on the home screen, they have to co-exist with the navigation that is established there. This limits the gesture support that is available in a widget compared to a full-screen app. While apps for example may support a view pager that allows the user to navigate between screens laterally, that gesture is already taken on the home screen for the purpose of navigating between home panels.
The only gestures available for widgets are:
Touch
Vertical swipe
这是否意味着可以监听 AppWidget 上的垂直滑动?
最佳答案
我想这意味着您只能滚动浏览 ListView 或浏览 StackView 的项目(通过垂直滑动)。
无法实现常规的 onScroll,也无法实现 AppWidget 的 onTouch 监听器。
关于Android AppWidget 垂直滑动 - 如何,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22894387/