是否可以将SwipeRefreshLayout中的默认可提取进度更改为自定义可提取进度?
如果是,是否会丢失旋转/动画或其他属性?
最佳答案
mSwipeRefreshLayout = (SwipeRefreshLayout)findViewById(R.id.your_swiperefresh_id);
try {
Field f = mSwipeRefreshLayout.getClass().getDeclaredField("mCircleView");
f.setAccessible(true);
ImageView img = (ImageView)f.get(mSwipeRefreshLayout);
img.setImageResource(R.drawable.your_drawable_file);
} catch (NoSuchFieldException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}