One Bar at a time
Closed this issue · 2 comments
Zeyad-37 commented
Is there a way to make sure i only have one bar showing at any given moment ?
broakenmedia commented
You can simply use something like this in the meantime:
if(scanCompleteFlashBar == null) {
scanCompleteFlashBar = new Flashbar.Builder(ScanActivity.this)
.gravity(Flashbar.Gravity.TOP)
.title("Hello World!")
.duration(3000)
.message("You can show a modal overlay to give a dim effect in the entire screen.")
.vibrateOn(Flashbar.Vibration.SHOW)
.backgroundColorRes(R.color.colorPrimaryDark)
.showOverlay()
.build();
}
if(!scanCompleteFlashBar.isShown()){
scanCompleteFlashBar.show();
}
Zeyad-37 commented
Thanks