버튼이있어서 돌고 싶기 때문에 xml 파일을 만들어 배경으로 설정했습니다. 버튼은 이제 둥글지만 xml 파일로 하드 코딩하는 대신 프로그래밍 방식으로 색상을 변경할 수 있기를 원합니다. 어떻게해야합니까?버튼 색상을 프로그래밍 방식으로 변경하는 방법 - Android
여기 내 둥근 버튼을위한 xml 파일입니다.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="#ffcb05"/>
</shape>