0
我有以下的方法來處理,當我觸摸屏幕:如何在觸摸屏時保留onTouchEvent?
public boolean onTouchEvent(MotionEvent event) {
boolean touchDown = true;
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.i(TAG,"touching the screen: YES");
case MotionEvent.ACTION_UP:
touchDown = false;
Log.i(TAG,"touching the screen: NO");
}
return touchDown;
}
的logcat的結果,當我觸摸屏幕而不刪除我的手指是:
touching the screen: YES
touching the screen: NO
我不想顯示第二個日誌,直到我從屏幕釋放myfinger。
我在做什麼錯了?
謝謝。
哦,我不知道我怎麼能忘記這一點。它反彈!非常感謝你 – karse23 2011-02-22 20:46:22