How can ShowcaseView (library) be used with GridView or ListView?
The library is https://github.com/amlcurran/ShowcaseView
For those who have the same problem, I just found a great solution :
showcaseView = new ShowcaseView.Builder(getActivity(),true)
    .setTarget(new ViewTarget(myListView.getChildAt(0).findViewById(R.id.itemIcon)))
    .setStyle(R.style.CustomShowcaseTheme)
    .setContentTitle("My test")
    .setContentText("I love fries")
    .setOnClickListener(new View.OnClickListener() {
         ...
     }
Well, you get the element you want with getChildAt(0) and just do a findViewById on it !
Don't need to create any other views !
You can try something like this:
in your layout you can have an invisible button over element you want show
<Button
    android:id="@+id/showcase_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="140dp"
    android:visibility="invisible"
    android:text="Showcase" />
and then simply set that element as a target
ViewTarget target = new ViewTarget(R.id.showcase_button, this);
new ShowcaseView.Builder(this)
                .setTarget(target)
                .setContentTitle("Choose smthn")
                .setContentText("Some other information can be here.")
                .hideOnTouchOutside()
                .build();
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With