Skip to content Skip to sidebar Skip to footer

Move Imageview From Outside Screen

I am trying to do a move + fade in animations to an imageView. I want it to slide from outside the screen to the middle of the screen. here's what I have tried : activity xml: <

Solution 1:

Remove your move.xml

Then add in this

publicvoidmove(){
    ImageViewimg_animation= (ImageView) findViewById(R.id.cityImage);

    TranslateAnimationanimation=newTranslateAnimation(600.0f, 0.0f, 0.0f, 0.0f);         
    animation.setDuration(5000);      

    img_animation.startAnimation(animation);  
}

Move from Right to middle

Omg 600 is too much, just use 100 in fromXdelta

Post a Comment for "Move Imageview From Outside Screen"