title: Change color Text from CustomTextView
body: <p>By default to change textColor programatically is : </p>
  
  <pre><code>textView.setTextColor(Color.RED);
  </code></pre>
  
  <p>I need to have a custom Textview to change typeface and color by default, How can change textcolor from CustomTextView class, here is my code. </p>
  
  <pre><code>public class CustomTextView extends TextView {
  
      public CustomTextView(Context context, AttributeSet attrs, int defStyle) {
          super(context, attrs, defStyle);
  
  
  
  
      }
  
      public CustomTextView(Context context, AttributeSet attrs) {
          super(context, attrs);
  
      }
  
      public CustomTextView(Context context) {
          super(context);
  
  
      }
  
  public void setTypeface(Typeface tf, int style) {
  
      if(!isInEditMode()) {
          if (style == Typeface.BOLD) {
              super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/Lato-Bold.ttf"));
          } else if(style == Typeface.ITALIC){  // constant used to set Lato-Light.
              super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/Lato-Light.ttf"));
          }else {
              super.setTypeface(Typeface.createFromAsset(getContext().getAssets(), "fonts/Lato-Regular.ttf"));
          }
      }
  }
  </code></pre>