How to set a gradient background to a Material Button?

前端 未结 4 1662
甜味超标
甜味超标 2021-01-17 11:57

I\'m currently using this code but the background is not changing.It is still showing accent-color as background.



        
4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-17 12:30

    To set background you need to make your base theme extend

    Theme.AppCompat.Light.NoActionBar

    and not

    Theme.MaterialComponents.Light.NoActionBar

提交回复
热议问题