Circular Reveal Android Compat With Design Library 28

后端 未结 2 1741
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-20 18:23

How To Create A Circular Reveal Animation In Android With Design Library Version 28

I Saw few Classes Which They Are Have Reveal Word Like This Items :

a         


        
2条回答
  •  一整个雨季
    2021-02-20 19:15

    I am not familiar with those views, but the way to create circular reveal is as follows:

    val view= ... //Get your view
    val cx = view.width / 2
    val cy = view.height / 2
    val finalRadius = Math.hypot(cx, cy)
    val anim = ViewAnimationUtils.createCircularReveal(view, cx, cy, 0, finalRadius) //this is the important one here
    anim.start()
    

提交回复
热议问题