Android事件处理(7)
来源:未知 责任编辑:责任编辑 发表时间:2014-01-06 18:18 点击:次
break;
}
//return true;
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
switch(keyCode)
{
case KeyEvent.KEYCODE_HOME:
DisplayEventType("Home up");
break;
case KeyEvent.KEYCODE_BACK:
DisplayEventType("Back up");
break;
case KeyEvent.KEYCODE_DPAD_LEFT:
DisplayEventType("Left up");
break;
}
//return true;
return super.onKeyUp(keyCode, event);
}
public boolean onKeyDown(int keyCode, KeyEvent event)
{
switch(keyCode)
{
case KeyEvent.KEYCODE_HOME:
DisplayEventType("Home down");
break;
case KeyEvent.KEYCODE_BACK:
DisplayEventType("Back down");
break;
case KeyEvent.KEYCODE_DPAD_LEFT:
DisplayEventType("Left down");
break;
}
//return true;
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event)
{
switch(keyCode)
{
case KeyEvent.KEYCODE_HOME:
DisplayEventType("Home up");
break;
case KeyEvent.KEYCODE_BACK:
DisplayEventType("Back up");
break;
case KeyEvent.KEYCODE_DPAD_LEFT:
DisplayEventType("Left up");
break;
}
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>