How to override styles of a library which has its own Activity

寵の児 提交于 2019-12-04 01:57:13
mobiledev Alex

If "colorPrimary" will use the same value - @color/primaryColor, then value of library primaryColor will be overridden by primaryColor in sample app.

If you will use different values for "colorPrimary" in library and app, for example - @color/libPrimaryColor and @color/appPrimaryColor then colors will be different

You can override the theme in your style file,

<style name="LibraryTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="colorPrimary">Your color</item>
    <item name="colorPrimaryDark">Your color, too</item>
</style>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!