1.OnClickListener
只有一个方法onclick(View view),当前View被点击时候调用
2.OnLongClickListener
长按
3.OnFocusChangeListener
当焦点变化时候调用
4.OnKeyListener
被调用的条件:当前组经获得焦点和用户按下键
public boolean onTouch(View v,MotionEvent event)
{
switch(event.getAction())
{
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_UP:
}
}
5.OnTouchListener
当触摸事件传递给当前组件的时候,注册在当前组建内部的OnTouchListener才会被执行
只有一个方法onclick(View view),当前View被点击时候调用
2.OnLongClickListener
长按
3.OnFocusChangeListener
当焦点变化时候调用
4.OnKeyListener
被调用的条件:当前组经获得焦点和用户按下键
public boolean onTouch(View v,MotionEvent event)
{
switch(event.getAction())
{
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_UP:
}
}
5.OnTouchListener
当触摸事件传递给当前组件的时候,注册在当前组建内部的OnTouchListener才会被执行