没有进度微调器的 SwipeRefreshLayout [英] SwipeRefreshLayout Without Progress Spinner

查看:74
本文介绍了没有进度微调器的 SwipeRefreshLayout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以执行 SwipeRefreshLayout 功能而不一起显示进度微调器.现在它的工作非常好,它的默认行为是拉动刷新显示进度微调器和 onRefresh() 我隐藏它.但我想把它隐藏在一起只是想使用拉动来刷新功能但没有进度微调器.

Is it possible to perform SwipeRefreshLayout functionality without showing progress spinner all together. Right now its working perfectly fine with its default behavior of pull to refresh shows Progress spinner and onRefresh() I hide It. But I want to hide it all together just want to use the pull to refresh functionality but without progress spinner.

推荐答案

完成后,一些 RnD 找到了一个解决方案,可以帮助其他想要实现此类功能的人

After Done some RnD found a solution that may help others who want to achieve such functionality

 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();
    }

这篇关于没有进度微调器的 SwipeRefreshLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆