简体   繁体   English

在Android小部件中控制ViewFlipping

[英]Control ViewFlipping in Android Widget

Here is what I have to do: 这是我要做的:

I want to create a widget which plays a short video clip. 我想创建一个播放短视频剪辑的小部件。 So, what I did is, to do screenshots of the movies and get a series of screenshots of it and switch the image in a certain frame rate to achieve what I want. 因此,我要做的是制作电影的屏幕截图并获得一系列的屏幕截图,并以一定的帧频切换图像以实现我想要的效果。

In here, I used ViewFlipper and a number of ImageView under it. 在这里,我使用了ViewFlipper及其下面的许多ImageView。 But the problem comes. 但是问题来了。

I have no idea how to set ViewFlipper to flip through all the ImageView once and stop at the last one. 我不知道如何设置ViewFlipper一次翻阅所有ImageView并停在最后一个。 I tried to set it as AutoStart true and set it back to false after a certain time (using Handler) but it doesnt work. 我尝试将其设置为AutoStart true,并在一段时间后(使用Handler)将其设置回false,但是它不起作用。

can anyone help? 有人可以帮忙吗?

您是否尝试过在视图stopFlipping()上调用stopFlipping()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM