content: package com.github.amlcurran.showcaseview.sample;
  
  import android.app.Activity;
  import android.graphics.Color;
  import android.graphics.Paint;
  import android.graphics.Typeface;
  import android.os.Bundle;
  import android.text.Layout;
  import android.text.TextPaint;
  
  import com.espian.showcaseview.sample.R;
  import com.github.amlcurran.showcaseview.ShowcaseView;
  import com.github.amlcurran.showcaseview.targets.ViewTarget;
  
  public class CustomTextActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_custom_text);
  
          TextPaint paint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
          paint.setTextSize(getResources().getDimension(R.dimen.abc_text_size_body_1_material));
          paint.setStrikeThruText(true);
          paint.setColor(Color.RED);
          paint.setTypeface(Typeface.createFromAsset(getAssets(), "RobotoSlab-Regular.ttf"));
  
          TextPaint title = new TextPaint(Paint.ANTI_ALIAS_FLAG);
          title.setTextSize(getResources().getDimension(R.dimen.abc_text_size_headline_material));
          title.setUnderlineText(true);
          title.setColor(Color.YELLOW);
          title.setTypeface(Typeface.createFromAsset(getAssets(), "RobotoSlab-Regular.ttf"));
  
          ShowcaseView showcaseView = new ShowcaseView.Builder(this)
                  .withNewStyleShowcase()
                  .setTarget(new ViewTarget(R.id.imageView, this))
                  .setContentTextPaint(paint)
                  .setContentTitle(R.string.custom_text_painting_title)
                  .setContentText(R.string.custom_text_painting_text)
                  .setContentTitlePaint(title)
                  .build();
  
          showcaseView.setDetailTextAlignment(Layout.Alignment.ALIGN_CENTER);
          showcaseView.setTitleTextAlignment(Layout.Alignment.ALIGN_CENTER);
          showcaseView.forceTextPosition(ShowcaseView.BELOW_SHOWCASE);
      }
  }
  