3
我一直在收到top, bottom, left, right = 0
。我想我做錯了,什麼是正確的方法? TIAgethitRect(),我做錯了,這是如何工作的?
在onCreate()
ImageView trash = (ImageView) findViewById(R.id.dropTarget_trash);
trash.setOnTouchListener(this);
Rect trashHit = new Rect();
trash.getHitRect(trashHit);
Log.d(TAG,"Trash left:" + trashHit.left + " right: " + trashHit.right + " top: " + trashHit.top + " bottom: " + trashHit.bottom);