code: private void setUpTextView1(View view) {
          // Setup single span
          TextView tv1 = (TextView) view.findViewById(R.id.tv1);
  
          CharSequence formattedText1 = Trestle.getFormattedText(
                  new Span.Builder("ForegroundSpan, BackgroundSpan, and CustomTypefaceSpan")
                          .foregroundColor(getContext(), R.color.purple_100)
                          .backgroundColor(getContext(), R.color.green_500)
                          .typeface(italicFont)
                          .build());
  
          tv1.setText(formattedText1);
      }
docs: region Helper Methods