So, I'm this library (https://github.com/amlcurran/ShowcaseView), it's working great but I need to hide the button it has because I really don't need it. I've tried using the method .replaceEndButton() by making it replace it with one invisible button I added to the XML file of the but it crashes
Asked
Active
Viewed 997 times
1 Answers
3
I fixed it by creating a button programmatically and making it with GONE visibility.
Button button = new Button(getContext());
button.setText("");
button.setEnabled(false);
button.setVisibility(View.GONE);
And then on the ShowcaseView builder method replaceEndButton(), I send this new button like this:
ShowcaseView sv = new ShowcaseView.Builder(getActivity())
.withMaterialShowcase()
.setTarget(new ViewTarget(fabIntercom))
.hideOnTouchOutside()
.replaceEndButton(button)
.setStyle(R.style.CustomShowcaseTheme)
.setContentTitle(R.string.showcase_main_title)
.setContentText(R.string.showcase_main_message)
.singleShot(42)
//.setParent()
.build();

Diego Rivera
- 403
- 1
- 5
- 19
-
Show this link https://stackoverflow.com/questions/22141856/android-showcase-view-how-to-use/52619873#52619873 – Sanjay Hadiya Oct 03 '18 at 04:52
-
It has a bug! even with `singleShot` it overlays an invisible frame on screen lincluding my button! how can I fix this? – Mahdi Moqadasi Feb 04 '19 at 12:50