我有这个代码
pb = (ProgressBar) findViewById(R.id.progressBar1);
final float[] roundedCorners = new float[] { 5, 5, 5, 5, 5, 5, 5, 5 };
ShapeDrawable pgDrawable = new ShapeDrawable(new RoundRectShape(roundedCorners, null, null));
String MyColor = "#00FF00";
pgDrawable.getPaint().setColor(Color.parseColor(MyColor));
ClipDrawable progress = new ClipDrawable(pgDrawable, Gravity.LEFT, ClipDrawable.HORIZONTAL);
pb.setProgressDrawable(progress);
pb.setBackgroundDrawable(getResources().getDrawable(android.R.drawable.progress_horizontal));
此代码中的问题是,对于可绘制的进度和可绘制的次要进度,我具有相同的颜色。
如何设置次要进度颜色?