是否可以在不显示进度微调器的情况下执行 SwipeRefreshLayout
功能。现在,它的默认拉动刷新行为完美无缺地显示了 Progress 微调器和 onRefresh()
我隐藏了它。但我想将它们全部隐藏在一起,只是想使用拉动来刷新功能,但没有进度微调器。
最佳答案
在完成一些 RnD 之后找到了一个解决方案,可以帮助其他想要实现此类功能的人
try {
Field f = mSwipeRefreshLayout.getClass().getDeclaredField("mCircleView");
f.setAccessible(true);
ImageView img = (ImageView)f.get(mSwipeRefreshLayout);
img.setAlpha(0.0f);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
关于android - 没有进度微调器的 SwipeRefreshLayout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45621101/