[英]Why isn't multi-touch working for my imagebuttons?
我正在使用使用SoundPool播放声音的图像按钮。 这是图像按钮之一的示例代码:
ImageButton Button1 =(ImageButton)findViewById(R.id.sound); Button1.setOnTouchListener(new OnTouchListener(){
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN ) {
mSoundManager.playSound(1);
return false;
}
return false;
}
});
由于某些原因,它不允许您同时单击多个按钮。 是因为我要开发1.6 SDK吗?
谢谢!
你为什么不使用onClickListener ??????
ImageButton t = new ImageButton(this);
t.setOnClickListener(clickListener);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.