标签:
一: GestureDetector
http://blog.csdn.net/jjwwmlp456/article/details/21282239 写的不错,但是
博文中有错误,正确的写法是:
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
if (e1.getX()-e2.getX()>120) {//左滑,右边显示
ToastUtils.showShortToast(PersonalCenterActivity2.this, "左滑,右边显示");
}
if(e1.getX()-e2.getX()<-120) {
ToastUtils.showShortToast(PersonalCenterActivity2.this, "右滑,左边显示");
}
return false;
}
http://www.cnblogs.com/ok-lanyan/archive/2012/08/02/2619701.html
二:Android的Activity屏幕切换动画(一)-左右滑动切换:
http://www.oschina.net/question/97118_34343
标签:
原文地址:http://my.oschina.net/u/1389206/blog/373503