关于android shape属性的一点有关问题

关于android shape属性的一点问题
我在做一个自定义组件,就是一个圆形的背景加文字。
这个圆形的背景用到了shape,定义如下

<!--bg_circle.xml-->
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
   <solid android:color="#E93149"/>
   <!-- <stroke android:width="2dp" android:color="#000"/> -->
</shape>

我想自定义一个变量可以改变这个shape的color的值。
我在组件中是这么使用的

<RelativeLayout
                        android:id="@+id/notify_circle"
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:background="@drawable/bg_circle" ><!--在这里用到了bg_circle.xml-->

                        <TextView
                            android:id="@+id/text"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_centerInParent="true"
                            android:textColor="@android:color/white"
                            android:textSize="8sp"
                             />
                    </RelativeLayout>

我想把上面一块抽出来做一个自定义组件,即想改变这个圆的背景色(shape里面的color),可以不呢?如果可以,要怎么做呢?
我知道如果改变这个圆的大小和TextView的文字,但是不知怎么改变shape的颜色
------解决方案--------------------
GradientDrawable p = (GradientDrawable) mContentView.getBackground();
        p.setColor(getResources().getColor(backgroundResId));