Is it possible to change the default progress drawable in SwipeRefreshLayout to a custom drawable?
If yes, will I lost the rotation/animation or other property?
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();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With