Closed marynovskyi closed 6 years ago
Hi marynovsky,
1) There are considered two ways to close the Bubble. The first one is clicking the target and the second one is clicking the close action image. So, by now, it is not considered to add a third button.
2) A way to disable the close action image could be interesting. This option will be available in the next library version.
3) Regarding the click listeners, it is possible to listen user action events using BubbleShowCaseListener:
BubbleShowCaseBuilder(this) //Activity instance
.title("foo")
.listener(listener(object : BubbleShowCaseListener{ //Listener for user actions
override fun onTargetClick(bubbleShowCase: BubbleShowCase) {
//Called when the user clicks the target
}
override fun onClose(bubbleShowCase: BubbleShowCase) {
//Called when the user clicks the close button
}
})
.targetView(buttonArrowRightShowCase)
.show()
Thanks for use our library and we hope that it has been useful for you. ;)
@JorgeCM hi and thanks for quick answer. About third point - the problem is in when I have some logic after click by target view I have to duplicate code inside both methods (onTargetClick and onClose). Maybe it makes sense to let user cancel the bubble by taping outside and make close action more customizable?
Hi marynovsky,
A new library version has been published:
implementation 'com.elconfidencial.bubbleshowcase:bubbleshowcase:1.2.0'
Now, you can disable close action image passing 'true' at 'disableCloseAction' function in BubbleShowCaseBuilder object. :)
Hi marynovsky,
A new library version has been published:
implementation 'com.elconfidencial.bubbleshowcase:bubbleshowcase:1.3.0'
Now, you could listen more user events:
BubbleShowCaseBuilder(this) //Activity instance
.title("foo") //Any title for the bubble view
.listener(listener(object : BubbleShowCaseListener{ //Listener for user actions
override fun onTargetClick(bubbleShowCase: BubbleShowCase) {
//Called when the user clicks the target
}
override fun onCloseActionImageClick(bubbleShowCase: BubbleShowCase) {
//Called when the user clicks the close button
}
override fun onBubbleClick(bubbleShowCase: BubbleShowCase) {
//Called when the user clicks on the bubble
}
override fun onBackgroundDimClick(bubbleShowCase: BubbleShowCase) {
//Called when the user clicks on the background dim
}
})
.show() //Display the ShowCase
Enjoy!
Hi! Thanks for your lib, I've found it very useful for me, but I'd appreciate if you add some more functions. Is it possible to add some functions below?
Ability to add button inside bubble (e.g. OK), to disable close action, to add onClickListeners for bubbles, to add click listeners for single event (target view, bubble, close)