@Override
public boolean onTouchEvent(MotionEvent event) {
int height=this.getMeasuredHeight();
final int x = (int) event.getX();
final int y = (int) event.getY();
switch(event.getAction())
{
case MotionEvent.ACTION_DOWN:
mFirstY=y;
motionPosition = this.pointToPosition(x, y);
//Log.i("==MyGridview==onTouchEvent====", "==motionPosition="+motionPosition);
mFirstClickPosition=this.getFirstVisiblePosition();
// Log.i("======onTouchEvent======", "=y="+y);
// Log.i("======onTouchEvent======", "=mFirstClickPosition="+mFirstClickPosition);
if (motionPosition >= 0) {
v = getChildAt(motionPosition - this.getFirstVisiblePosition());
v.startAnimation(m_animation);
}
break;
case MotionEvent.ACTION_MOVE:
mFirstY=y;
Log.i("======onTouchEvent======", "=y="+y);
break;
}
return super.onTouchEvent(event);
}
}