user3556657 user3556657 - 1 month ago 16
Android Question

How to display Show Case views one after another


I have 4 buttons.I need to give showcase views for each button.But the
problem is that when creating show case views for each button on
Oncreate,all showcase view display simultaneously.How can i display it
one after the other?.

Oncreate Code


target = new ViewTarget(R.id.shutdown, this);show_showcase(target, "Tutorial", "Click this button...");
target = new ViewTarget(R.id.track, this);show_showcase(target, "Tutorial", "Click this button to...");
target = new ViewTarget(R.id.lock, this);show_showcase(target,"Tutorial","Click this button to...");
target = new ViewTarget(R.id.unlock, this);show_showcase(target,"Tutorial","Click this to ...");



function show_showcase


void show_showcase(final ViewTarget target,final String title,final String content) {

Selection.this.runOnUiThread(new Runnable() {
public void run() {

new ShowcaseView.Builder(Selection.this, true)
.setTarget(target)
.setContentTitle(title)
.setContentText(content)
.setStyle(R.style.CustomShowcaseTheme)
.build();

}
});


}

Answer

i found it..i was using showcase view version 5 which donot have showcase views class..downgraded and added version 4 to my android studio project and fixed it..

1.select legacy release of showcase view
2.download the showcaseview library
3.add it to application
4.use showcaseviews class

Example of this class is given in sample app in showcase view library

Comments