The Home screen is made of two layers: - The background (or Workspace) that shows the image; this layer scrolls and draws the wallpaper with a different scroll value. Workspace behaves more or less like a simplified horizontal layout - The screens (or CellLayouts) that display the icons; this layer is made of 3 CellLayout side by side. CellLayout is a custom grid-like layout.
We definitely did not use an AbsoluteLayout and nor should you. The fling is implemented using a VelocityTracker, a Scroller and regular View.scroll methods. On Thu, Sep 11, 2008 at 8:10 AM, Peli <[EMAIL PROTECTED]> wrote: > > I had thought the Android home screen was a single big view, as it is > one big background image that spans across the three slices, and the > icons on top are positioned individually (note that they scroll faster > than the background). > > If I were to code it, I would displace the coordinates of all views in > the AbsoluteLayout by the coordinate shifts obtained through > onTouchEvent, and use some Handler for the final fling. I don't know > if there is a more elegant way to do it within the Android framework, > or how it is actually done for the home screen. > > Peli > > On Sep 11, 4:51 pm, Kavi <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I am currently using a View Flipper to create views on the fly and >> allow the user to move between views by performing a fling action on >> the screen. But the way it currently works is that after the fling >> action is performed, the changing of the view is triggered which uses >> a move in and move out animation. >> >> What i want to have is something like the home screen of android where >> the user can see the new view while he is trying to drag/scroll the >> screen. >> I want a view that the user can just drag to either go to the right or >> the left side and the views on either side can be a part of the >> current view or can be new views that are inflated at runtime. >> >> Does anybody know how to implement this? >> >> Thoughts? >> >> Thanks >> >> - Kavik > > > -- Romain Guy www.curious-creature.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

