Android Open Source - ismartenit Roboto Text View






From Project

Back to project page ismartenit.

License

The source code is released under:

GNU General Public License

If you think the Android project ismartenit 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.smartenit.client.views;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;
//from  ww w.ja  v a2 s .c om

public class RobotoTextView extends TextView {

    public RobotoTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init();
    }

    public RobotoTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }

    public RobotoTextView(Context context) {
        super(context);
        init();
    }

    public void init() {
      if(!isInEditMode()){
        Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "fonts/Roboto-Thin.ttf");
        setTypeface(tf ,1);
      }
    }
}




Java Source Code List

com.smartenit.client.AreasFragment.java
com.smartenit.client.DeviceDetailActivity.java
com.smartenit.client.DevicesActivity.java
com.smartenit.client.MainActivity.java
com.smartenit.client.ScenesFragment.java
com.smartenit.client.SettingsActivity.java
com.smartenit.client.SquareImageView.java
com.smartenit.client.TypefaceSpan.java
com.smartenit.client.WizardsFragment.java
com.smartenit.client.adapter.AreaItemAdapter.java
com.smartenit.client.adapter.DeviceItemAdapter.java
com.smartenit.client.adapter.TabsPagerAdapter.java
com.smartenit.client.views.RobotoTextView.java