skydoves / Balloon

:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android.
https://skydoves.github.io/libraries/balloon/html/balloon/com.skydoves.balloon/index.html
Apache License 2.0
3.7k stars 289 forks source link

TalkBack support when setFocusable(false) #470

Open alashow opened 1 year ago

alashow commented 1 year ago

Re-opening https://github.com/skydoves/Balloon/issues/407 since the issue is still there

Please complete the following information:

Describe the Bug:

Using setFocusable(false) allows touching other views without having to click twice ( if setFocusable(true), need to click once outside balloon to dismiss ballon and another to click for intended view)

However, setFocusable(false) disables TalkBack behavior when balloon is shown. Only after clicking the ballon window TalkBack service announces ballon windows text.

skydoves commented 1 year ago

Hey @alashow, sorry for the delayed response. What if you call the function below to the balloon's content view like the example below?

balloon.bodyWindow.contentView.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED)