我开始在我的最新项目中实现 Material 主题,为新 L 版本的发布做好准备。
我一直在阅读 Material Design 指南并发现了这一点。
UI Color Application
Choose your palette
Limit your choice of colors by choosing three color hues in the primary and one accent color in the secondary palette. The accent color may or may not need fall back options
它或多或少解释了如何在应用程序上实现这些色调,包括强调色,但是当在我的应用程序上使用带有 SwipeRefreshLayout 进度条的主颜色时,感觉不太对劲。
它应该是强调色和 android:colorPrimary
的混合吗?
对此有什么想法吗?对于我错过的 Material 设计指南中的进度条的实现,有什么解释吗?
提前致谢
请您参考如下方法:
Material 设计规范已更新为 swipe to refresh pattern 的新指南.
从支持库的修订版 21 开始,SwipeRefreshLayout
现在显示圆形指示器。
当您开始向下滑动时,指示器会出现一个箭头(表示正在刷新)。当您松开它时,它会失去箭头并开始旋转。
现在我们仍然可以设置配色方案,进度条将在颜色之间循环。
那么我们应该使用哪些颜色?
让我们来看看 Google I/O source code :
mSwipeRefreshLayout.setColorSchemeResources(
R.color.refresh_progress_1,
R.color.refresh_progress_2,
R.color.refresh_progress_3);
这是 colors :
<color name="refresh_progress_1">@color/theme_accent_2</color>
<color name="refresh_progress_2">@color/theme_accent_1</color>
<color name="refresh_progress_3">@color/theme_primary</color>
所以,是的,它是主色和强调色的混合。