android - How to animate a child view and having the parent view to automatically resize? -


I have a quick question.

I'm trying to animate a child's view to make it disappear. This part is easy, but during the animation, the size of the parents' view is not changed. How can I do to change the size of the parents during animation?

Here is my current code:

  Animeshnset set = new animation set (true); Animation feed = new scale animation (1.f, 1.f, 1.f, 0); Animation fade2 = new alpha animation (1, 0); Set.addAnimation (fade); Set.addAnimation (fade2); Set.setDuration (2000); Set.setFillAfter (true); BgColor.startAnimation (set);  

bgColor is the scene that I am missing. Here is the end result:

You can see the difference after the animation.

Any thoughts?

Thanks in advance!

After the animation is completed you can add an animation Listnr and can change the layout

  animation KsetAnimationListener (new animation Listnr) {@Override public void onAnimationEnd (animation animation) {BgColorksetVisibility (see. GONE);} @ override public void Pranimeshn repetition (animation animation) {} @ public override void Pranimeshnstart (animation animation) {}});  

Also, make sure your stuff gets around with a ()!


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -