Android FAB icon always black with MaterialComponents theme

后端 未结 8 482
南旧
南旧 2020-11-29 04:02

I\'m creating an Android app and I\'m using the AndroidX libraries and Material design theme. My app theme on styles.xml is:


colorSecondary is the responsible color for FloatingActionButton. and colorOnSecondary is the responsible color for icon color of FloatingActionButton.

In your AppTheme you have not defied the colorSecondary. So, it took the default black color from parent Theme.MaterialComponents.Light.DarkActionBar.

Reference : Android dev summit, 2018 - The Components of Material Design

提交回复
热议问题