Closed devinclava closed 8 years ago
IconButton
doesn't make any change to the style.
What makes you think your style is not applied?
When used with a normal button it take @color/colorAccent as background and white text (including additional styles).
When I used with IconButton it take white as background and black text color (and change other styles).
Having the same issue too. has anyone found the solution?
Not sure if this is related, but whenever I try to write a new class and extend Button (e.g. IconButton), the new button (e.g. class IconButton) just look different from the standard button (class Button). So I assume this is not a android-iconify problem.
At the end, I write a function to put icon on standard button instead of using IconButton
public void iconify(TextView view, CharSequence text) {
view.setTransformationMethod(null);
view.setText(Iconify.compute(view.getContext(), text, view));
}
As @luaz said this is not specific to Iconify. I guess the design library creates its own button when "Button" is encountered in XML, which is not compatible with a custom subclass. Applying Iconify programmatically to existing buttons is the way to go to be fully compatible with the design library, as suggested before.
view.setTransformationMethod(null);
view.setText(Iconify.compute(view.getContext(), text, view));
The IconButton don't apply the correct Style when use