PrograssBar的setIndeterminateDrawable不起作用

是设置绘制不显示进度的进度条的Drawable对象
使用中发现,在xml中设置IndeterminateDrawable可以正常使用,但是如果需要在代码中更换图片使用setIndeterminateDrawable时,PrograssBar被隐藏掉。

此时应使用方法

Drawable d = this.getResources().getDrawable(R.id.dd);

d.setBounds(1,1,16,16);

progressBar.setIndeterminateDrawable(d);

原文地址:https://www.cnblogs.com/dubo-/p/5582563.html