0

I am using https://github.com/amlcurran/ShowcaseView to make a simple tutorial but the title or the text comes up all compressed in left corner.

Using

        sv.setShouldCentreText(true);

doesn't make a difference. Here is the code.

    ViewTarget target = new ViewTarget(R.id.mainImage1, this);
    ShowcaseView sv=
    new ShowcaseView.Builder(this)
            .setTarget(target)
            .setContentTitle("Long click to set wallpaper")
            .build();

and the title comes up as enter image description here

Arslan Mehboob
  • 1,012
  • 1
  • 9
  • 21

1 Answers1

0

define target separate and then use it.

 ShowcaseView showcaseView;
    Target T1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my);
        T1=new ViewTarget(R.id.button,this);

        showcaseView=new ShowcaseView.Builder(this)
                .setTarget(Target.NONE)
                .build();
        showcaseView.setButtonText("buttonname");
        showcaseView.setShowcase(T1,true);
        showcaseView.setContentTitle("tutorial");
        showcaseView.setContentText("explainit");

}
I think this will help you
ATUL ANAND
  • 51
  • 2