ShowcaseView
ShowcaseView copied to clipboard
Add API for showing multiple Showcases
This seems to be a commonly requested feature.
My current thinking on this API is usage along the lines of:
sv = new ShowcaseView.Builder(this)
.withMaterialShowcase()
.setTarget(target)
.setContentTitle("Item one")
.setContentText("Some description")
sv.thenShow()
.withMaterialShowcase()
.setTarget(target2)
.setContentTitle("Item two")
.setContentText("Some description")
.build();
One problem I am foreseeing here is when the first Showcase has a singleShot() already then it won't be shown, then second Showcase wouldn't be shown as well. If I am processing it properl...
Whereas, if we could inflate the ShowcaseViews, then kind of put them in a list, then it wouldn't be a problem as we can be sure that all the ShowcaseViews will be gone over. And it would be pretty flexible.
I got this idea from this blog that use a past version of your library : https://www.novoda.com/blog/showcaseview-customisation-and-having-consecutive-showcases/
ha I know that blog :) got any suggestions @blundell, as you wrote it?!
:smiley_cat: not sure what I can add, the list of showcase views could be done under the hood of the api Alex suggests in the original issue. Then a normal showcase view of 1 item can just be a list of size 1.
I will suggest you to create another class that contains a queue. You can add how many showcases you want (The build method can be refactored to not show the showcase). When you call the show method on the queue, it will show one by one with an interval of a second between them. If a showcase in the queue was already displayed, it is not displayed, going to the next showcase in the queue.
It will be nice to have an optional callback in each showcase to tell if it can be displayed. In fragments (TabLayout) for example, the showcase can be only displayed if the fragment is visible to user (getUserVisibleHint method).
Look at this another library: https://github.com/deano2390/MaterialShowcaseView
May I know how to customize it to work with images instead of colors?