I having trouble understanding how to apply and then run an animation with a view though.
I create the animation: Animation identityOverlayAnimationIn = new AlphaAnimation(0.0f, 1.0f); identityOverlayAnimationIn.setDuration(5000); identityOverlayAnimationIn = new TranslateAnimation( Animation.RELATIVE_TO_SELF, -0.0f,Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f,Animation.RELATIVE_TO_SELF, 0.0f ); Than apply it to the RelativeLayout: theLayout.setAnimation(identityOverlayAnimationIn); Then run it like this: identityOverlayAnimationIn.start(); But it doesn't seem to work... On Apr 8, 4:53 pm, Mark Murphy <mmur...@commonsware.com> wrote: > mscwd01 wrote: > > How do I animate a Layout? > > > I have a RelativeLayout which sits in a certain position within my > > Activity; I want to glide it in and out from the bottom of the screen > > when a certain button is pressed. > > > I have found examples of animating the children of lists etc but this > > is not what I want. I simply want to animate the whole layout and the > > views within it together. > > > I am guessing this is simple to do but the solution is proving > > somewhat elusive! > > Look at android.view.animation. It works on any View -- RelativeLayout > inherits from View. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Training:http://commonsware.com/training.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---