How to create a circular outlined Material Button in Android?

前端 未结 2 1304
时光说笑
时光说笑 2021-02-07 02:21

I am trying to create a button with an icon in the center. The top and bottom part of the circle are a little flat. Is there a way to do this without using corner radius? Here i

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-07 03:09

    You can use the app:shapeAppearanceOverlay attribute to define the corner size. You can use the 50% value.

    
    

    with:

      
    

    or with the style="@style/Widget.MaterialComponents.Button.Icon"

    It requires the version 1.1.0.

提交回复
热议问题