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

4

1 回答 1

0

单独定义目标然后使用它。

 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");

}
我想这会对你有所帮助

于 2015-02-21T16:15:45.273 回答