Office flipper pages - like Android home screens

Does anyone know of a library or method that I can use to emulate how Android home screens work?

What I mean:

A control that will accept any number of subviews. It will only show one of these views at a time, however, when a user drags his finger across the screen, he switches to the next or previous view, depending on how the user drags his finger.

I saw a few examples (SwipeGestureListener comes to mind), but they do not work as we would like. They require swipe gestures, which means the widget does not move if there is no actual scrolling. For this reason, it is not clear that pages can be switched using this method.

Any information would be great.

+7
source share
4 answers

This is probably what you need http://code.google.com/p/deezapps-widgets/ .

Tried to use it in my project, but didn't work with ListViews with gradient as background.

+5
source

Home screen

This link is the source code for Android. Workspace.java is what you need. Workspace. Java extends the ViewGroup, and you can break the code down to your needs.

+3
source

The control above is called ViewPager, which is the Android Compatibility Package from Android. But the Android ViewPager does not include a pager indicator control by default.

Do not worry. There are many open source libraries that give you a "pager indicator light" along with ViewPager. IMHO, two of the best:

If you have time, it's good to check out many of the Android UI controls that are included in the Android UI Patterns app: https://market.android.com/details?id=com.groidify.uipatterns

+1
source

Take a look at ViewFlipper, ViewSwitcher, etc. depending on your needs.

http://developer.android.com/reference/android/widget/ViewFlipper.html

There are some neat samples in the SDK.

For checks and other gestures, capture MotionEvents and act accordingly.

0
source

All Articles