Back to project page RobotoViews.
The source code is released under:
Apache License
If you think the Android project RobotoViews 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.pjcorp.robotoview.view; /*from w w w . j a va2s. co m*/ import android.content.Context; import android.graphics.Typeface; import android.util.AttributeSet; import com.pjcorp.robotoview.utils.TypefaceManager; /** * Re write DigitalClock class integrating Roboto font */ public class DigitalClock extends android.widget.DigitalClock { public DigitalClock(Context context) { super(context); } public DigitalClock(Context context, AttributeSet attrs) { super(context, attrs); onInitTypeface(context, attrs, 0); } protected void onInitTypeface(Context context, AttributeSet attrs, int defStyle){ if(attrs != null){ Typeface typeface = TypefaceManager.getTypeface(context, attrs, defStyle); if(typeface != null){ setTypeface(typeface, 0); } } } }