Floating Action Button with square shape

前端 未结 4 1851
轮回少年
轮回少年 2021-01-05 23:31

When I set a color to my fab, it looks like so:

\"enter

My layout xml:

4条回答
  •  广开言路
    2021-01-05 23:56

    Use

    app:backgroundTint="@android:color/holo_green_dark"
    

    (for example) to set color of fab. Result below. Taken from this -tested- code snippet.

    enter image description here

    Also edit : "strange green color" should come from your accent color. That's the color fab takes by default.

提交回复
热议问题