Check Mobile App
Read now
Start a Project

show and hide a view with animation

Save

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-

Referencesdeveloper.android.com

. . .

Leave a Comment

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


2 comments

  • 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

    When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.

    Michael Urresta

    Michael Urresta

    Talk to Sales

    Global

    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