我在我的应用程序中使用进度条一切正常工作是变化是35%以下的颜色但问题是它显示双重效果看图像http://imgur.com/SMU3xG3它的颜色变为红色但也显示双重效果我将改为黑????
progressBar = (ProgressBar) findViewById(R.id.signalLevel);
private String getSignalLevelString(int level) {
String signalLevelString = "Weak";
level=35;
if (level >= EXCELLENT_LEVEL)
{
signalLevelString = "High";
progressBar.getProgressDrawable().setColorFilter(Color.GREEN, Mode.MULTIPLY);
}
else if (level <= GOOD_LEVEL)
{
signalLevelString = "Weak";
progressBar.getProgressDrawable().setColorFilter(Color.RED, Mode.MULTIPLY);
}
return signalLevelString;
}
XML代码:
<ProgressBar
android:id="@+id/signalLevel"
android:layout_width="60dp"
android:layout_height="wrap_content"
android:indeterminate="false"
android:progress="100"
style="@style/progressStyle"/>