[android-developers] Slide-up/down animation clipping my background
I am trying to create a view slide-up / slide downeffect, where a menu
slides up from the bottom of the screen, and pushes the existing views
upwards... basically the same thing that the soft keyboard does.
Using a basic TranslateAnimation tween animation, on the menu and root
layout, I am able to get the desired effect. The catch, however, is
that when my root layout slides up, the background image (ImageView)
gets cropped / clipped, and the subsequent slide-down will have an
empty / black area corresponding to whatever area was pushed off the
screen.
How do I prevent my background from getting clipped?
Heres the basic block of code.....
TranslateAnimation slide = new TranslateAnimation(0, 0, 0,
menu.getHeight());
slide.setDuration(300);
slide.setFillAfter(true);
menu.startAnimation(slide);
root.startAnimation(slide);
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home