Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Slide Top to Bottom View Animation

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3.02k
    Comment on it

    To show animation on any view like on ImageView, I am implementing animation to show slide a view from top to bottom.

    We need to create an xml file in anim folder. Here name top_bottom.xml

    <?xml version="1.0" encoding="utf-8"?>
    <set xmlns:android="http://schemas.android.com/apk/res/android">
        <translate
            android:duration="1000"
            android:fromYDelta="-100%p"
            android:toYDelta="0" />
    </set>
    

    Then we need to implement this from code.

    mDownArrowImageView is the animation on which I am implementing animation.

     private Animation mAnimationSlide;
    
    mAnimationSlide = AnimationUtils.loadAnimation(MainActivity.this, R.anim.top_bottom);
    
    mDownArrowImageView.startAnimation(mAnimationSlide);
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: