Open IAmDarush opened 4 years ago
There is a bug in the TemplateView
when checking colours.
if (primaryTypefaceColor > 0 && primaryView != null) {
primaryView.setTextColor(primaryTypefaceColor);
}
As colours are normally ARGB values, the first bit is normally set which gets treated as a negative value and fails this test.
Changing all these tests to be != 0
seemed to work for me.
int primaryTypefaceColor = styles.getPrimaryTextTypefaceColor();
if (primaryTypefaceColor != 0 && primaryView != null)
{
primaryView.setTextColor( primaryTypefaceColor );
}
int secondaryTypefaceColor = styles.getSecondaryTextTypefaceColor();
if (secondaryTypefaceColor != 0 && secondaryView != null)
{
secondaryView.setTextColor( secondaryTypefaceColor );
}
int tertiaryTypefaceColor = styles.getTertiaryTextTypefaceColor();
if (tertiaryTypefaceColor != 0 && tertiaryView != null)
{
tertiaryView.setTextColor( tertiaryTypefaceColor );
}
int ctaTypefaceColor = styles.getCallToActionTypefaceColor();
if (ctaTypefaceColor != 0 && callToActionView != null)
{
callToActionView.setTextColor( ctaTypefaceColor );
}
I'm using the following method to set the typeface color. However, withPrimaryTextTypefaceColor() and withSecondaryTextTypefaceColor() don't seem to be working.