Floating Action Button Icon not centered inside

前端 未结 8 2568
鱼传尺愫
鱼传尺愫 2021-01-02 13:07

I\'m trying to use a FAB but the icon inside is placing at bottom right of the button:

FAB with icon not centered

This is the FAB definition in the xml:

8条回答
  •  攒了一身酷
    2021-01-02 13:31

    In my situation run ok this solution app:fab_icon="@drawable/btn_back_to_top_3x" enter image description here not android:src="@drawable/btn_back_to_top_3x enter image description here

    And you can add android:scaleY="1.X" android:scaleX="1.X"

    for additional variation

提交回复
热议问题