안드로이드 버튼 배경 색 바뀌지 않는 증상
안드로이드 버튼 위젯은 xml의 background 속성으로 배경 색을 변경할 수 있다.
그런데 배경색이 변경되지 않을 경우 테마의 MaterialComponents가 원인일 수 있다.
MaterialComponents는 버튼 배경색을 default로 가지고 있어서 다른 색으로 변경이 안된다고 하는데, 자세히 알아본것이 아니라서 확실하진 않다. 어쨌든 내 경우 이 MaterialComponents가 원인이었다.
테마에서 MaterialComponents 대신 AppCompat로 변경하면 문제를 해결할 수 있다.
MaterialComponents 변경방법
themes.xml파일로 이동한다.

MaterialComponents를 AppCompat로 변경한다.



