バージョン 4.0 より前のデバイス、つまり ics で問題なく動作するアプリケーションを作成しましたが、ics より上では必要に応じて動作しません。私のアプリケーションでは、2 つのボタンで同時にマルチタッチを作成しようとしていましたが、バージョン 4.0 未満では完全に機能していました。action_mask の値は、オンタッチとオフタッチで 6 nd 5 でした.4.0 より上のバージョンでは 1, 2, 0 でした.なぜこれが?
enter code here
@override
public boolean ontouch(Event ev , MotionEvent event)
{
int actionResolved = event.getAction() & MotionEvent.ACTION_MASK;
int action = paramMotionEvent.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK;
// int actionShift = paramMotionEvent.getAction() & MotionEvent.ACTION_POINTER_INDEX_SHIFT;
Log.i("fil", "action resolved" +actionResolved);
if(i==MotionEvent.ACTION_DOWN)
{
Log.i("fil", "action down");
Log.i("fil", "action down value" +MotionEvent.ACTION_DOWN);
}
if(actionResolved == 5);
{
Log.i("fil", "action resolved" +actionResolved);
scannerview1.startAnimation(anim1);
scannerView2.startAnimation(anim1);
}
if(actionResolved ==6)
{
scannerView2.clearAnimation();
scannerview1.clearAnimation();
}
return true;
}