tag requires a 'drawable' attribute

前端 未结 3 1553
渐次进展
渐次进展 2021-02-09 01:30

I am trying to very simply style a Button. I just want it blue with with text when not pressed, and white with blue text when clicked.

I tried to do this w

3条回答
  •  不知归路
    2021-02-09 01:50

    android:background seems to accept drawable selectors but not color selectors... so just leave a color as your android:background, and use a normal color selector with android:backgroundTint, which expects colors anyway:

    at styles.xml:

    
    

    (res/color/background_color_selector.xml is a normal color selector.)

提交回复
热议问题