I want to know about the image translation activity.
The layout should contain two images and these two images should
split towards left and right at the same time when we click a button
one image should translate towards left and the other towards right.
Help is appreciated.
Either post code or check out the documentation on what you’re asking and get a little more descriptive. This isn’t a vending machine for code, people generally don’t want to just code things for people because they ask for it. What exactly are you having problems with would be a good start? Please read documents, try again and if you can’t get it come back with details; you’ll find help quicker.
[edit]—-tutorial below—–
Since you’ve actually given some level of detail here I suppose I’ll show you a simple method. First,
thisis a great place for animation information. Use it. Second, this code worked perfect for me on the Droid2.The
main.xmlfile:The
animation_test.xml(defining translate animation)The
animation_test2.xmlIf you can’t understand this, go back and read both documents I’ve given you. There is enough information here to understand just about any of the animations. However, your wanting to use
animationDrawableobjects isn’t right, because that’s a frame animation, not a transformation or motion. Frame based animation is simply making something look like it’s dancing, or waving. When you’re trying to simply move, fade, or scale an image you want transformation animations. Hope this helps!