I am building an android application. Where I am adding custom theme Color(Blue, Red, Yellow ETC) which can be choose by users.
I am able to apply custom theme for my view, text and icon. The challenging part is to add different color for primary button and secondary button for single theme.
Example - For Blue theme Primary Button: bg - Blue, text - White Seconry color: bg - White, border and text as red
Custom Style
<style name="AppThemePurple" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimaryPurple</item>
<item name="colorPrimaryDark">@color/colorPrimaryDarkPurple</item>
<item name="colorAccent">@color/colorAccentPurple</item>
</style>
Set the materialButtonStyle to
AppThemePurple