Ripple effect for lollipop views

前端 未结 4 366
有刺的猬
有刺的猬 2021-02-01 19:28

I have been developing an app for Lollipop (API 21).

When I change the Button color to something, the ripple effect doesn\'t works.

I found some t

4条回答
  •  遥遥无期
    2021-02-01 20:17

    You have to set your button's background to a RippleDrawable which you can define in XML. (I'll name it holo_blue_ripple.xml)

     
    
         
    
    
    

    Then reference it with android:background="@drawable/holo_blue_ripple".

提交回复
热议问题