erkutaras / ShowcaseView

ShowcaseView library for Android
Apache License 2.0
231 stars 41 forks source link

Showcase is not displayed #32

Open EnricoAncis opened 4 years ago

EnricoAncis commented 4 years ago

Hi,

I'm trying to use your ShowcaseView library, I has followed as is in the read me but the showcase is not displayed. This's my simple code:

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:gravity="center">

        <Button
            android:id="@+id/button"
            android:layout_width="80dp"
            android:layout_height="50dp"
            android:text="Button" />

</LinearLayout>

MainActivity.java

import com.erkutaras.showcaseview.ShowcaseManager;

public class MainActivity extends AppCompatActivity  {

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

      Button btn = (Button) findViewById(R.id.button);

     ShowcaseManager.Builder builder = new ShowcaseManager.Builder();
        builder.context(this)
                .key("KEY")
                .developerMode(true)
                .view(btn)
                .circle()
                .descriptionTitle("LOREM IPSUM")
                .descriptionText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")
                .buttonText("Done")
                .add()
                .build()
                .show();
    }

}

What I doing wrong?

dkati commented 3 years ago

i have the same issue

harryharihar commented 3 years ago

Same issue

betomdk commented 3 years ago

I solved it like this: Handler().postDelayed( { callBuilder() }, 1000)

blaz-cerpnjak commented 2 years ago

The solution from betomdk has solved the problem for me.

myt041 commented 2 years ago

worked after adding handler