Android: Slide gesture and animation for switching between tabs

萝らか妹 提交于 2019-12-03 04:05:16
Upvote

Basic Gesture Detection - stackoverflow

Introduction to Gestures - mobile tuts

you have to definde your gestures with the android gesture tool (you can find it in the emulator) and implement a gesture listener to listen for gesture events.

You can now find support for this behavior out-of-the-box in the Android SDK compatibility libs. It won't be using a TabHost, but it supports the behavior you describe: ViewPager

Houcheng

Two things has to be done:

  • Register Guesture listening object to every view group
  • On detecting guesture event, create an animation object to move this view group and at end, remove this view group

Please see the answer by Blundell in this post: How to Animate Addition or Removal of Android ListView Rows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!