我已成功将进度条的颜色更改为 Color 中可用的颜色(蓝色、绿色等),但是当我给出特定颜色的十六进制代码时,我得到一个没有任何内容的条。我该如何解决这个问题?
ProgressBar pg = (ProgressBar)findViewById(R.id.progressBarDownload);
final float[] roundedCorners = new float[] { 5, 5, 5, 5, 5, 5, 5, 5 };
ShapeDrawable progressDrawable = new ShapeDrawable(new RoundRectShape(roundedCorners, null,null));
progressDrawable.getPaint().setColor(0x01060012);//<-----problem here?
ClipDrawable progress = new ClipDrawable(progressDrawable, Gravity.LEFT, ClipDrawable.HORIZONTAL);
pg.setProgressDrawable(progress);
pg.setBackgroundDrawable(getResources().getDrawable(android.R.drawable.progress_horizontal));
pg.setProgress(40);