码迷,mamicode.com
首页 > 移动开发 > 详细

Android中view的事件

时间:2016-01-21 15:49:21      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

view:top、left、right、bottom,相对于parent的位置参数,获取通过get*()来获取。width=right-left、height=bottom-top。x=left+translationx,y=top+translationY。translationX和translationY默认都是0,在view平移过程中top和left是不变的,x、y和translationX、translationY变化。

motionEvent,TouchSlop

VelocityTracker,GestureDetector,Scroller

view三种滑动方式:1.view本身的scrollTo/scrollBy,2、施加平移效果,3、改变LayoutParams重新布局。

scroll只能滑动view内容不能滑动view本身。

 

                                                                                   

Android中view的事件

标签:

原文地址:http://www.cnblogs.com/doubleqi/p/5148433.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!