Hello,
          I am trying to animate a few images as part of my activity
such that the images overlap partially with each other. To be able to
do the same, since there is no such layout which provides this
facility, I have created my own layout extending from ViewGroup and
overriding the onMeasure and onLayout methods, wherein I compute and
place my images encapsulated inside ImageView. To animate these images
so that the image on the front goes behind and newer one comes up, on
some event say a touch event, I have created my own animation class
extending from Animation class. Having put some basic animation in
place, I see that the animation happens correctly but at the end of
the animation requesting the relayout of the images, the image
location is not what I had set initially. With respect to the
situation above I have couple of related questions. I hope it is ok to
ask them all in a single thread.

Q1. What is the relation between the animation and the layout of views
because of which, after the animation, the location of views is not
same as before the animation?

Q2. In the scenario above, my objective is to only change the
placement of the views with animation displayed in between. Is there
any other / better way of achieving the same effect and how?

Q3. In my Animation class extended from
android.view.animation.Animation, in the applyTransformation function,
if I don't call camera.getMatrix, the animation doesn't seem to have
any visible effect. I am not sure why should getMatrix affect the
animation. The function looks something like this:

protected void applyTransformation(float interpolatedTime,
Transformation t)
{
        mCamera.save();
        mCamera.translate(0.0f, 0.0f, 310* interpolatedTime);
        mCamera.getMatrix(matrix);
        mCamera.restore();
}


Any help, suggestion and pointers is appreciated,
Regards,
DivKis

-- 
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

Reply via email to