use of com.github.amlcurran.showcaseview.ShowcaseView in project ShowcaseView by amlcurran.
the class CustomTextActivity method onCreate.
@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);
}
use of com.github.amlcurran.showcaseview.ShowcaseView in project ShowcaseView by amlcurran.
the class MemoryManagementTesting method showcase.
private void showcase() {
new ShowcaseView.Builder(this).withMaterialShowcase().setContentText(String.format("Showing %1$d", currentShowcase)).setTarget(new ViewTarget(R.id.buttonBlocked, this)).setShowcaseEventListener(new SimpleShowcaseEventListener() {
@Override
public void onShowcaseViewDidHide(ShowcaseView showcaseView) {
currentShowcase++;
showcase();
}
}).build();
}
Aggregations