FlipView for Android v0.9 Beta Released

Sep 21st, 2012

I’m happy to announce the first release of FlipView, an Android UI component which help add flipping animation in your application. Please download and install the pre-built demo APK file to check out it in action:

Core Classes

The general routine of setting up FlipViewController is straightforward:

Creates an instance of FlipViewController:

1

FlipViewControllerflipView=newFlipViewController(context);

Provides an adapter as the data source. It’s very similar to the setup logic for a ListView:

12345678910111213141516171819202122

flipView.setAdapter(newBaseAdapter(){@OverridepublicintgetCount(){returncount;}@OverridepublicObjectgetItem(intposition){returnposition;}@OverridepubliclonggetItemId(intposition){returnposition;}@OverridepublicViewgetView(intposition,ViewconvertView,ViewGroupparent){//setup a view by either reusing the convertView or creating a new one. returnview;}});

Important Notes

There are some facts about the component which you should pay special attention to:

It’s recommended to use only ONE instance per activity. As the animation is implemented in a GLSurfaceView, using multiple instances in one activity may cause serious compatible problems on some Android devices.

Vertical scroll in sub-views may not work as the touch events are consumed by the animation.

I don’t have enough resources to test its compatibility across all Android OS versions and devices. Please verify it after integrating it in your project.

Please use Github issues to report any problems and request more features. Thanks in advance.