show and hide a view with animation

Updated 7 October 2017

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

author
. . .

Leave a Comment

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


2 comments

  • Sathish Valleru
    • Sathish Valleru
  • Start a Project


      Message Sent!

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

      Back to Home