Android 带背景的进度条

Android 带背景的进度条,android,Android,我想在进度条上添加背景图。所以,我使用android:background作为后台,android:progressDrawable作为progressDrawable,当我添加这些资源时,它看起来很wierd,因为progressDrawable看起来比后台小,我希望它与后台“匹配”——与后台大小相同。我使用经典的HDPI、XHDPI等图标作为背景。我只希望进度视图和背景具有相同的大小。是否有其他人尝试向进度视图添加背景 这是进度条 <ProgressBar android

我想在进度条上添加背景图。所以,我使用android:background作为后台,android:progressDrawable作为progressDrawable,当我添加这些资源时,它看起来很wierd,因为progressDrawable看起来比后台小,我希望它与后台“匹配”——与后台大小相同。我使用经典的HDPI、XHDPI等图标作为背景。我只希望进度视图和背景具有相同的大小。是否有其他人尝试向进度视图添加背景

这是进度条

   <ProgressBar
    android:id="@+id/progressBar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:indeterminate="false"
    android:indeterminateOnly="false"
    android:background="@drawable/ic_message_cancel"
    android:max="100"
    android:progress="50"
    android:progressDrawable="@drawable/circular_progress_bar" />

和圆形进度条:

<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="270"
android:toDegrees="270" >

<shape
    android:shape="ring"
    android:useLevel="true" >

    <gradient   
        android:angle="0"
        android:endColor="@color/gray"
        android:startColor="@color/gray"
        android:type="sweep"
        android:useLevel="false" />
</shape>
</rotate>

请显示so代码,以便我们检查您的实施情况。SO信息: