How do I set the disabled color of a button with AppCompat?

后端 未结 7 1497
臣服心动
臣服心动 2020-12-12 20:41

I use this style to change the background color of my Button:



As mentioned in this answer on using the Widget.AppCompat.Button.Colored style, the disabled color is controlled by colorButtonNormal and the enabled color is controlled by colorAccent. By using the ThemeOverlay.AppCompat.Dark, the textColor is automatically changed to dark, meaning you may not need the custom ThemeOverlay at all.

提交回复
热议问题