嗯,我有一段时间有这个问题了,我觉得它有点讨厌... A使用来自Clans(https://github.com/Clans/FloatingActionButton)的FloatingActionButton并且在触摸FloatingActionMenu之后出于某种原因尝试触摸FloatingActionButton下面的错误显示在我的logcat中。我已经在另一个设备(BQ Aquaris,NEXUS 5和HUAWEI P8)中测试过并且总是得到相同的消息。在FloatingActionButton中第一次触摸后,所有其他触摸均匀,同一个FloatingActionButton开始正常工作,就在第一次我收到此消息...
可能是什么?有人有这个错误吗?
12:06:14.916 4760 test INFO View Touch down dispatch to android.widget.ImageView{42305d38 V.ED.... ......I. 0,0-320,547 #7f060016 app:id/imageView}, event = MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=132.7305, y[0]=411.52383, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2697993, downTime=2697993, deviceId=3, source=0x1002 }
12:06:14.919 4760 test INFO View Touch down dispatch to com.github.clans.fab.Label{42300ce0 V.ED..C. ......I. 63,392-199,419}, event = MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=69.7305, y[0]=19.523834, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2697993, downTime=2697993, deviceId=3, source=0x1002 }
12:06:14.920 4760 test DEBUG VelocityTracker Couldn't open '/dev/touch' (Permission denied)
12:06:14.920 4760 test DEBUG VelocityTracker tpd read x fail: Bad file number
12:06:14.920 4760 test DEBUG VelocityTracker tpd read y fail: Bad file number
12:06:14.978 4760 test INFO View Touch up dispatch to com.github.clans.fab.Label{42300ce0 V.ED..C. ...p..I. 63,392-199,419}, event = MotionEvent { action=ACTION_UP, id[0]=0, x[0]=69.7305, y[0]=19.523834, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=2698055, downTime=2697993, deviceId=3, source=0x1002 }
代码:
fab = (FloatingActionButton)findViewById(R.id.capture);
fabCapturar.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
fab.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Intent i = new Intent(MainActivity.this, CameraActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivityForResult(i, _Photo);
overridePendingTransition(0, 0);
}
});
}
});
我对如何解决此错误一无所知......谷歌并不想提供帮助!
感谢您的帮助!
答案 0 :(得分:1)
将fab带到所有观点的前面试试这个
fab.bringToFront();