我正在制作一个自定义的TextView(Java类),但是我在“原始TextView”xml上找不到正确的翻译方法来解决这一行问题。
android:background="@drawable/myDrawableShape"
将Java void应用于更改“myDrawableShape”颜色
myDrawableShape.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#ffafafaf" />
<corners android:radius="15dp" />
我将从一个字符串中获取颜色设置,通过以下void程序更改颜色:
void colorSet(String color)
提前致谢!