Android setBackgroundTintList on pre-lollipop devices

前端 未结 3 1353
日久生厌
日久生厌 2020-12-29 07:26

I\'m working with FloatingActionButton. The user should be able to switch the FAB background color within a onClick Event.

However, the rec

3条回答
  •  囚心锁ツ
    2020-12-29 07:52

    From XML, you can use

    card_view:backgroundTint="@color/your_color"
    

    where card_view is xmlns:card_view="http://schemas.android.com/apk/res-auto"

提交回复
热议问题