如何实现Android编程中支持长尾词输入的两点触控功能?
- 内容介绍
- 文章标签
- 相关推荐
本文共计793个文字,预计阅读时间需要4分钟。
原文:本文实例讲述了Android编程实现两点触摸功能。分享给大众供大家参考,具体如下:下面是一个两点触摸的案例代码:package com.zzj; import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: // 按下事件 case MotionEvent.ACTION_MOVE: // 移动事件 case MotionEvent.ACTION_UP: // 抬起事件 break; } return true; } }简化版:本文展示了如何实现Android两点触摸功能。
本文共计793个文字,预计阅读时间需要4分钟。
原文:本文实例讲述了Android编程实现两点触摸功能。分享给大众供大家参考,具体如下:下面是一个两点触摸的案例代码:package com.zzj; import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: // 按下事件 case MotionEvent.ACTION_MOVE: // 移动事件 case MotionEvent.ACTION_UP: // 抬起事件 break; } return true; } }简化版:本文展示了如何实现Android两点触摸功能。

