0

Viewflipper在我的应用程序中使用我在Viewflipper.

现在发生的事情是它在最后一项之后显示连续滚动中的第一项。

我需要停止它,因为滚动需要在到达最后一项后在任何特定方向停止,反之亦然。

谢谢,大卫

4

1 回答 1

0

If you are using timed interval flipping, you can call stopFlipping() when you hit the last view.

If you are doing it manually via showNext() and showPrevious(), then you can simply set a flags in your code to check for the first and last views and handle the swipe actions. For example:

if(lastFlag==true)
{

}
else
{
 vf.showNext();
}

Here's a good tutorial on using ViewFlipper:

http://www.techrepublic.com/blog/app-builder/a-dog-limps-into-a-saloon-a-tutorial-on-androids-viewflipper-widget/634

于 2012-11-03T06:44:49.083 回答