show and hide a view with animation


ViewAnimation – 

We can use the view animation system to perform tweened animation on Views. Tween animation calculates the animation with information such as the start point, end point, size, rotation, and other common aspects of an animation.

A sequence of animation instructions defines the tween animation, defined by either XML or Android code. The animation instructions define the transformations that we want to occur, when they will occur, and how long they should take to apply.

Show and hide a view- it is an important part of the application. Many of the cases we want to show and hide a view with user visibility, it is attractive part of visibility, so we need to add an animation to view that render on hiding and showing.

we can take an example- we want to show and hide a view when RecyclerView is scrolling (look once on view part).

How will we do?

Add our RecyclerView with listeners such as OnScrollListener

add animation showView animation

and HideViewAnimation-

How it looks-

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


  • Sathish Valleru
    how about hide view completely when we scroll up? can you share that logic
    • Sathish Valleru
      is it possible hide the view completely when we scroll up?
  • css.php

    It was a successful collaboration. The Mobikul team provided the client everything they needed in a timely and high-quality manner. They were very professional, reliable, and accessible during the entire process. The client also saw no room for any improvements in the vendor's performance.

    Vincenzo Carrano

    Vincenzo Carrano

    Administrator, Segshop

    Talk to Sales


    Live Chat
    Start a Project

      Message Sent!

      If you have more details or questions, you can reply to the received confirmation email.

      Back to Home