Open ericxu1983 opened 9 years ago
RoadMap: 先看懂DrawerLayout的用法 再取看DrawLayout的源码
官方的例子也写的太复杂了
github open source: https://github.com/SimonVT/android-menudrawer
郭霖的demo, 用leftMargin来做 http://blog.csdn.net/guolin_blog/article/details/8714621
VelocityTracker的用法
1000表示pixels/second?
什么时候有action_cancel?
ViewGroup中的OnInterceptTouchEvent,拦截了touch事件,child view还可以收到当次的touch事件,但是action是action_cancel了,后面当然收不到任何touch事件了
getX(),getY(), relative to view. getRawX, getRawY, relative to screen
getPointerId(), 多指触摸,每一个手指就是一个pointer
ViewDragHelper比较好的一篇文章: http://fedepaol.github.io/blog/2014/09/01/dragging-with-viewdraghelper/
突然想起了uber的选择人民优步等等的拖动效果,可以用这个来做啊
scroller类的说明: http://blog.sina.com.cn/s/blog_3e3fcadd0101bsx7.html
http://blog.csdn.net/c_weibin/article/details/7438323
scroller的example
思考: . 新版android可以使用属性动画来实现Scroller的动效 . 至于没有动效的移动,大小等,可以直接使用setTranslationX, setTranslationY等
例如抽屉效果