【UI】【View】MotionEvent类详解
来源:互联网 发布:作头部ct的危害知乎 编辑:程序博客网 时间:2024/06/05 10:08
本文将详细讲解MotionEvent类的一些成员和方法。
了解MotionEvent,可以更好地了解控件的一些特效,如拖动控件或多点缩放控件。同时,掌握MotionEvent类也是学好android触控技术的基础。
了解MotionEvent,可以更好地了解控件的一些特效,如拖动控件或多点缩放控件。同时,掌握MotionEvent类也是学好android触控技术的基础。
一、MotionEvent常见的常量
1)单点动作
ACTION_DOWN
A pressed gesture has started, the motion contains the initial starting location.
public static final int ACTION_DOWN = 0; 单点触摸动作
ACTION_UP
A pressed gesture has finished, the motion contains the final release location as well as any
intermediate points since the last down or move event.
public static final int ACTION_UP = 1;单点触摸离开动作
ACTION_OUTSIDE
A movement has happened outside of the normal bounds of the UI element.
public static final int ACTION_OUTSIDE= 4;触摸动作超出边界
ACTION_CANCEL
The current gesture has been aborted
public static final int ACTION_CANCEL = 3;触摸动作取消.
ACTION_MOVE
A change has happened during a press gesture (between ACTION_DOWN and ACTION_UP).
public static final int ACTION_MOVE= 2;触摸点移动动作
2)多点动作
ACTION_POINTER_DOWNpublic static final int ACTION_POINTER_DOWN = 5; 多点触摸动作 ACTION_POINTER_UP public static final int ACTION_POINTER_UP = 6; 多点离开动作
0 0
- 【UI】【View】MotionEvent类详解
- 安卓自定义View进阶-MotionEvent详解
- Android自定义View进阶-MotionEvent详解
- MotionEvent详解
- MotionEvent详解
- Android MotionEvent详解
- Android MotionEvent详解
- Android MotionEvent详解
- Android MotionEvent详解
- android MotionEvent详解
- Android MotionEvent详解
- View的onInterceptTouchEvent(MotionEvent ev)和dispatchTouchEvent(MotionEvent ev) 解析
- Android UI详解之View绘制原理
- MotionEvent详解与坐标含义
- android view 中 MotionEvent 及其事件处理
- Android - MotionEvent类
- MotionEvent
- MotionEvent
- Cocosd2d 实现图像描边shader
- CSS3动画(个人理解)
- java线程
- My97DatePicker设置,包括隐藏 清空,设置最大日期等
- 【bzoj2989】【数列】【cdq分治+树状数组】
- 【UI】【View】MotionEvent类详解
- Linux下同时打开编辑多个文件 【VSP、vim -o】
- 3、关于DST
- 创建母版页导致js出现“ 'document.getElementById(...)' 为空或不是对象”错误
- IOS 调试技巧 查看View的视图结构
- 增加phpmyadmin导入文件上限
- python修改编码方式
- 对前端框架的思考和理解
- 一念永恒 > 第132章 本源返祖之血