问题机型:htc wildfire
rom:2.3.5
问题描述:
R.drawable.progressbar_horizontal_jacinth是layer-list配置文件;
holder.infoprogressPb.setProgressDrawable(context.getResources().getDrawable(R.drawable.progressbar_horizontal_jacinth));
导致进度条不显示.
第一次尝试:
LayerDrawable layer = (LayerDrawable) context.getResources().getDrawable(R.drawable.progressbar_horizontal_blue);
layer.setBounds(holder.infoprogressPb.getProgressDrawable().getBounds());
holder.infoprogressPb.setProgressDrawable(layer);
进度条显示了,但是没有进度.
最终决定,通过second和progress两个状态分别显示不同颜色;
参考:
http://blog.youkuaiyun.com/fzh0803/article/details/9622097;
本文针对HTC Wildfire手机ROM为2.3.5版本中遇到的进度条无法正常显示的问题进行了解决方案的探讨。通过尝试不同的Drawable配置及使用LayerDrawable的方法,最终实现了进度条的有效显示。
1183

被折叠的 条评论
为什么被折叠?



