How can I Animate the color change of the statusbar and toolbar (like the new Calendar app does)

前端 未结 4 1617
逝去的感伤
逝去的感伤 2021-01-29 22:49

The new Google Calendar app has an animation I would like to do in my app. When you create a new event you can choose a color for the event. When you do, the statusbar and too

4条回答
  •  后悔当初
    2021-01-29 23:03

    After A great amount of research ,

    I've found an answer that you'd want.

    This animation is called a reveal animation introduced in the 21.0 Android API - lollipop . Unfortunately , it is not backwards compatible.

    I've found a library which does the same reveal animation but not exactly a backport , but the effect you want can be achieved API 14 onwards with this library

    https://github.com/markushi/android-ui

    Thank You,

    If you are keen on using this animation only with lollipop then just google "Android Reveal Colour Animation implementation".

提交回复
热议问题