code: public static boolean applyFontToTextView(final TextView textView, final Typeface typeface, boolean deferred) {
          if (textView == null || typeface == null) return false;
          textView.setPaintFlags(textView.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG | Paint.ANTI_ALIAS_FLAG);
          textView.setTypeface(typeface);
          if (deferred) {
              textView.setText(applyTypefaceSpan(textView.getText(), typeface), TextView.BufferType.SPANNABLE);
              textView.addTextChangedListener(new TextWatcher() {
                  @Override
                  public void beforeTextChanged(CharSequence s, int start, int count, int after) {
                  }
  
                  @Override
                  public void onTextChanged(CharSequence s, int start, int before, int count) {
                  }
  
                  @Override
                  public void afterTextChanged(Editable s) {
                      applyTypefaceSpan(s, typeface);
                  }
              });
          }
          return true;
      }
docs: Applies a Typeface to a TextView, if deferred,its recommend you don't call this multiple
  times, as this adds a TextWatcher.
  
  Deferring should really only be used on tricky views which get Typeface set by the system at
  weird times.
  
  @param textView Not null, TextView or child of.
  @param typeface Not null, Typeface to apply to the TextView.
  @param deferred If true we use Typefaces and TextChange listener to make sure font is always
  applied, but this sometimes conflicts with other
  {@link android.text.Spannable}'s.
  @return true if applied otherwise false.
  @see #applyFontToTextView(android.widget.TextView, android.graphics.Typeface)