【发布时间】:2013-02-06 09:17:10
【问题描述】:
您好,我已经在我的服务类中实现了 ontouchlistener,并尝试获取在 android 2.3 上运行良好但不适用于更高版本的触摸事件。我正在努力解决这个问题,但即使在阅读了 stackoverflow 中的大量文档后,我也没有得到任何解决方案,这是代码..请帮我解决这个问题
在 onCreate 方法中我定义了图像按钮
ImageButton imageButton=new ImageButton(this);
imageButton.setBackgroundColor(Color.TRANSPARENT);
imageButton.setOnTouchListener(this);
@Override public boolean onTouch(View arg0, MotionEvent arg1) {
Toast.makeText(getApplicationContext(), "Double touched "+DoubleTouch, 1000).show();
return false;
}
【问题讨论】:
-
没有安卓2.6版
-
安卓2.6没有正式版
-
好的,谢谢,请建议解决上述问题
标签: android android-4.0-ice-cream-sandwich android-4.2-jelly-bean ontouchlistener