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

    Webkul is a truly trusted and supported IT Company to develop business ideas for e-commerce. They provide professional support after deploying the solution to production and be responsible to act for fixing the reported issues or system errors. We highly encourage to deal with Webkul for business development.

    Hussein Zawia

    Hussein Zawia

    Co-founder, 24Dokan

    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