[英]Zoomable android widget with VideoView component
There is compound widget which consists of VideoView
and Button
. 有由VideoView
和Button
组成的复合窗口小部件。 VideoView
play video
, Button
handle events. VideoView
播放video
, Button
处理事件。 I'm struggling how to make it resizable according to pinch gesture
. 我正在努力如何根据捏gesture
调整其大小。
Unfortunately, it is not possible to add pinch zoom to widgets, since there is no way to add event listeners to widgets. 不幸的是,由于无法将事件侦听器添加到小部件,因此无法向小部件添加捏缩放。 The only way a widget can receive input is assigning on click intents to different components, which start activities. 窗口小部件可以接收输入的唯一方法是将点击意图分配给启动活动的不同组件。 As for videos, look into the VideoView
class, although AFAIK this doesn't work well (if at all) with widgets. 至于视频,请查看VideoView
类,尽管AFAIK不适用于小部件(如果有的话)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.