私はImageButton
自分のアプリケーションのレイアウトを持っていて、これの角を丸くしたいImageButton
ので、次のようなスタイルを使用しています:
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="1dp"
android:color="@android:color/black" />
<corners android:radius="15dp" />
<solid android:color="@android:color/black"/>
</shape>
そして、私は使用していますandroid:background="@drawable/my_rounded_shape.xml"/>
問題は、この後、背景色を黒からカスタム色に変更したいのですが、プログラムでスタイルを変更できず、コーナーで新しいスタイルを生成する方法がありませんが、別の色でImageButton
.
それを行う方法または回避策があることを明確にしていただけますか?