//此button要去findViewById功能才會在你螢幕裡哦

 

Button button;

 

button.setOnTouchListener(newOnTouchListener(){

 

@Override

publicbooleanonTouch(Viewv,MotionEventevent){

// TODO Auto-generated method stub

  if(event.getAction()==MotionEvent.ACTION_DOWN){  //按下的時候

           

        }  

        if (event.getAction() == MotionEvent.ACTION_UP) {  //起來的時候

           

        }

return false;

}

});

arrow
arrow
    全站熱搜

    Deyu 發表在 痞客邦 留言(0) 人氣()