프로그래밍 일반/안드로이드 심화
[안드로이드] 버튼 색상관련 블로그
코딩삽질일기
2020. 6. 10. 21:36
버튼의 enable, disable에 따라 모양을 바꾸고 싶을 때 쓸 수 있다.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:Android="http://schemas.Android.com/apk/res/Android">
<item Android:state_enabled="true">
<shape Android:shape="rectangle">
<solid Android:color="@color/yourEnabledColor" />
</shape>
</item>
<item Android:state_enabled="false">
<shape Android:shape="rectangle">
<solid Android:color="@color/yourDisabledColor" />
</shape>
</item>
</selector>
여기서 참조함