android - 支持库 r21 中的样式 SwipeRefreshLayout

标签 android android-support-library swiperefreshlayout

我找不到任何关于如何设置新 refreshIcon 样式的文档在swipeRefreshLayout

this.swipeRefreshLayout.setProgressBackgroundColor(R.color.feed_refresh_1);

这只是改变了 <background color>刷新图标背景,有没有办法改变箭头本身的颜色?

最佳答案

使用最新的 r21,您可以将仅传递一种颜色的旋转箭头色调更改为以下方法之一:

swipeRefreshLayout.setColorSchemeColors(Color.RED);

或:

swipeRefreshLayout.setColorSchemeResources(android.R.color.holo_red_dark);

经过测试并在 Android 5.0.2 上运行,应该也适用于 v4 之后的所有其他版本。 祝你有美好的一天!

关于android - 支持库 r21 中的样式 SwipeRefreshLayout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27145464/

相关文章:

android - SwipeRefreshLayout 在 API 4.2.2 上卡住

android - 即使颁发它的 CA 不可信,网络安全配置文件中固定的公钥是否可信?

android - AVDMANAGER -> 错误 : Invalid --tag default for the selected package

Android - 在 Android 2.2 + 中实现抽屉导航

android - 在支持库 25.1.0 中单击后,TextInputEditText 上的密码切换按钮消失

安卓设计库 : SwipeRefreshLayout don't detect swipe over CollapsingToolbarLayout

android - 亮度控制未反射(reflect)在设备上

user-interface - 如何使用JSON数据+cardslib android库动态填充卡片内容

Android onContentChanged 在 2.3 和 4.2 上

android - SwipeRefreshLayout Got Action_Move 卡住 View