Elevation animation on click on CardView

后端 未结 2 1944
离开以前
离开以前 2021-02-08 10:35

I want to add the elevation animation to my android.support.v7.widget.CardView, just like the material style Buttons do. I\'ve tried to set a Sta

2条回答
  •  旧时难觅i
    2021-02-08 11:03

    I've tried your code, maybe you have simply add the state to second selector element.

    So change this line

    
    

    with this

    
    

    The complete code will be

    
    
        
            
        
        
            
        
    
    

提交回复
热议问题