The second AlphaAnimation assignment isn't commented out in the actual
code. The formatting just got messed up here.

On Jan 20, 2:52 pm, jsera <[email protected]> wrote:
> What I want to do is simultaneously fade one view out, and fade
> another view in over the first one.
>
> My first thought was to use a ViewFlipper, the code I used was
> literally this simple:
>
> ViewFlipper flipper = (ViewFlipper)this.
> findViewById(R.id.mainViewFlipper);
> // add the new ViewController's view to the ViewFlipper View
> controllerView = controller.getView();
> flipper.addView(controllerView);
> // set animations
> AlphaAnimation transAnim = new AlphaAnimation(1.0f, 0.0f);
> transAnim.setDuration(TRANSITION_TIME);
> flipper.setOutAnimation(transAnim);
> // transAnim = new AlphaAnimation(0.0f, 1.0f);
> transAnim.setDuration(TRANSITION_TIME);
> flipper.setInAnimation(transAnim);
> //
> flipper.showNext();
>
> (TRANSITION_TIME = 400)
>
> The effect I got was that the in animation looked like it was being
> called twice. Totally not what I was looking for.
>
> So then, I just tried calling startAnimation directly on the two
> views, and what happened was the outAnimation worked fine, but the
> inAnimation went from 0.0f to 1.0f with no actual animation.
>
> This seems like a simple thing to implement, but is turning out to be
> more difficult than it should be. Can anyone help?

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