Unable to get exact circle shape when using card view

前端 未结 11 1871
旧时难觅i
旧时难觅i 2020-12-25 10:12

I\'m using card view for floating action button in android material design. I\'m using following code for get the circle



        
11条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-25 11:10

    To achieve a circular shape using Card view you can set the shape property, android:shape="ring".
    app:cardCornerRadius should be set to half the width or height of the child view

    
    
            
         
    

提交回复
热议问题