Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A page flipper control - like the android home screens

Tags:

android

Anyone know of a library or method I can use to emulate the way the Android homescreens work?

What I mean is this:

A control that will take any number of sub-Views. It will only show one of those Views at a time, however, when the user drags their finger over the screen, it'll switch to the next or previous view, depending on which way the user dragged their finger.

I've seen a few examples (SwipeGestureListener comes to mind), but they don't work in the way I'd like. They require a swipe gesture, which means the widget doesn't move unless there is an actual swipe. For this reason, it's not readily obvious that the pages are switchable using this method.

Any information would be great.

like image 330
synic Avatar asked Feb 19 '11 17:02

synic


2 Answers

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

Tried to use it in a project of mine but didn't work well with ListViews with a gradient as the background.

like image 56
Abhinav Avatar answered Sep 27 '22 22:09

Abhinav


Homescreen

This link is the android source code. Workspace.java is what u will need. The workspace.java extends the ViewGroup and u can strip down the code to your needs..

like image 39
Varun Avatar answered Sep 27 '22 21:09

Varun