I am using a button to trigger an animation of a view. This button
toggles the view, such that the view slides on and off the screen...
Class Members:
final Animation animout = AnimationUtils.loadAnimation(this,
R.anim.slideout );
final Animation animin = AnimationUtils.loadAnimation(this,
R.anim.slidein );
Click handler for the button:
public void onClick(View v)
{
View sv = findViewById(R.id.SV);
if(mDialIsIn)
{
sv.clearAnimation();
sv.startAnimation(animout);
mDialIsIn = false;
}
else
{
sv.clearAnimation();
sv.startAnimation(animin);
mDialIsIn = true;
}
}
So... it works... but...
This view that is moving around has a handler for the touch event. The
strange thing is... when my view is off screen, it is still getting
touch events for its "original" position on screen. It seems the
animation is only moving the visual aspect of the view (drawing
surface) and not the rest of the view's "guts".
Does this make sense?
Do I just need to manually turn off my handling of the touch event
while the view is animated off screen?
And...
My intention was to put other controls UNDER this view. If this view
is "on top" receiving touch events even when off screen, will controls
underneath get their events? Or... do I have to do something about the
Z order when the view is scrolled off screen?
Am I just going about this all wrong?
Thanks,
Buzz
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en