onTouch return an InvalidCastException
<p>Im getting an InvalidCastException with this piece of code:</p>

<pre><code>public boolean onTouch(View view, MotionEvent event) {
    if (!(view instanceof Card)) return false;
    int eventaction = event.getAction();
    Card card = (Card)view;
    int X = (int)event.getRawX();
    int Y = (int)event.getRawY();
    switch (eventaction) {
        case MotionEvent.ACTION_DOWN:
            card.setAlpha(128);
            card.bringToFront();
            SoundManager.playSound(1, 1);
            int rotation = (card.getRotation()-Card.ROTATION_HORIZONTAL) * -1;
            card.setRotation(rotation);
            break;
        case MotionEvent.ACTION_MOVE:
            card.setPosition(X - (card.getImage().getWidth()), Y - (card.getImage().getHeight()));
            break;
        case MotionEvent.ACTION_UP:
            card.setAlpha(255);
            SoundManager.playSound(2, 1);
            break;
    }
    return true;
}
</code></pre>

<p>Class card extend ImageView, this code work perfect in RelativeLayout but not in a LinearLayout... there is any reason for that?</p>
