Android AppWidget 垂直滑动 - 如何

标签 android android-layout android-widget android-gesture android-remoteview

在 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/

相关文章:

android - appcompat-v7 :25. 3.0 : AppCompat does not support the current theme features: { windowActionBar: false, 窗口ActionBarOverlay : false, 。 }

android - ImageView 将大图像缩小为模糊的小图像

android - 自定义 Spannable = ImageSpan + BackgroundColorSpan + ClickableSpan

android - 如何计算滚动的帧率?

android - 在 Windows 中将 MonkeyRunner 导入 Python 脚本失败

android - Cucumber 测试未按指定顺序运行,出了什么问题?

android - 如何制作可用于手机和平板电脑的响应式 Android 应用程序?

java - 具有自定义文本支持的小部件

android - runOnUiThread 没有调用

android - 使用 JSON 从平板电脑本地文件加载图像