第一頁 返回 繼續 最後一頁 摘要 圖形
使用GestureDetector
在Activity上面架設GestureDetector
用GestureDetector (Context context,
GestureDetector.OnGestureListener listener)
GestureDetector detector;
//event 橋接器
public boolean onTouchEvent(MotionEvent event) {
return (detector.onTouchEvent(event));
}
protected void onCreate(Bundle savedInstanceState) {
detector = new GestureDetector(this,this);//new 物件
}