How can I make my page slide as the user slides finger on the screen?

前端 未结 7 517
后悔当初
后悔当初 2020-12-04 09:12

How can I make my page slide as the user slides finger on the screen? Any example code?

I just require the same feel as it is on my android g-phone\'s home scre

7条回答
  •  青春惊慌失措
    2020-12-04 09:48

    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.

    The fling is implemented using a VelocityTracker, a Scroller and regular View.scroll methods.

提交回复
热议问题