相关疑难解决方法(0)

如何从代码中更改"纯色"?

我有一个Shape定义xml.现在我需要solid color从代码中更改一个,请问如何建议?

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" android:padding="10dp">
    <solid android:color="#000000"/>
    <corners
        android:bottomRightRadius="8dp"
        android:bottomLeftRadius="8dp"
        android:topLeftRadius="0dp"
        android:topRightRadius="0dp"/>
</shape>
Run Code Online (Sandbox Code Playgroud)

android android-layout android-xml

1
推荐指数
1
解决办法
5707
查看次数

标签 统计

android ×1

android-layout ×1

android-xml ×1