Android Open Source - RobotoViews Digital Clock






From Project

Back to project page RobotoViews.

License

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.

Java Source Code

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);
            }
        }
    }
}




Java Source Code List

com.pjcorp.robotoview.MainActivity.java
com.pjcorp.robotoview.utils.TypefaceManager.java
com.pjcorp.robotoview.view.AutoCompleteTextView.java
com.pjcorp.robotoview.view.Button.java
com.pjcorp.robotoview.view.CheckBox.java
com.pjcorp.robotoview.view.CheckedTextView.java
com.pjcorp.robotoview.view.Chronometer.java
com.pjcorp.robotoview.view.CompoundButton.java
com.pjcorp.robotoview.view.DigitalClock.java
com.pjcorp.robotoview.view.EditText.java
com.pjcorp.robotoview.view.MultiAutoCompleteTextView.java
com.pjcorp.robotoview.view.RadioButton.java
com.pjcorp.robotoview.view.Switch.java
com.pjcorp.robotoview.view.TextClock.java
com.pjcorp.robotoview.view.TextView.java
com.pjcorp.robotoview.view.ToggleButton.java