Back to project page fonticon.
The source code is released under:
Apache License
If you think the Android project fonticon listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.shamanland.fonticon; /* ww w .ja v a 2 s. c o m*/ import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.util.AttributeSet; import android.widget.Button; public class FontIconButton extends Button { public FontIconButton(Context context) { super(context); } public FontIconButton(Context context, AttributeSet attrs) { super(context, attrs); if (!isInEditMode()) { CompoundDrawables.init(context, attrs, this); } } public FontIconButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); if (!isInEditMode()) { CompoundDrawables.init(context, attrs, this); } } public void updateCompoundDrawables() { CompoundDrawables.update(this); } @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) public void updateCompoundDrawablesRelative() { CompoundDrawables.updateRelative(this); } }