Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whole balloon is focused when displayed initially #258

Open
nvasilev0101 opened this issue Oct 4, 2021 · 10 comments
Open

Whole balloon is focused when displayed initially #258

nvasilev0101 opened this issue Oct 4, 2021 · 10 comments

Comments

@nvasilev0101
Copy link

  • Library Version 1.3.9
  • Affected Device(s): I've tested it on devices with API 30 only, so Pixels and the Emulator

Describe the Bug:

I have implemented your library as a tool for showing mentions. The problem is, that after I show the pop-up, it gains focus I assume, which disappears after you touch the pop-up.

This is how I'm using the library:

balloon = Balloon.Builder(anchor.context)
                .setLayout(popupLayout)
                .setArrowSize(14)
                .setWidthRatio(0.72f)
                .setArrowElevation(4)
                .setFocusable(false)
                .setBackgroundColorResource(R.color.white)
                .setElevation(4)
                .setLifecycleOwner(anchor.findViewTreeLifecycleOwner())
                .build()

Also, I tried using .setOverlayShape(BalloonOverlayCircle(radius = 0f)), but it didn't change anything.

Expected Behavior:

I would expect to have the pop-up show without that tint or focus or whatever it is. Any idea what might be causing the tint to show like that?

@skydoves
Copy link
Owner

skydoves commented Oct 6, 2021

Hi @nvasilev0101,
Please add the below codes to your builder.

.setDismissWhenTouchOutside(false)
.setFocusable(false)

@nvasilev0101
Copy link
Author

Hi @skydoves,
I did play around with those options, but the tint is still showing even after setting both options to false.

@skydoves
Copy link
Owner

Hey @nvasilev0101, sorry for the late response.
Did you solve this issue? Also, I recommend using the recent version 1.4.5. Thanks!

@TapiocaFox
Copy link

Hey @nvasilev0101, sorry for the late response. Did you solve this issue? Also, I recommend using the recent version 1.4.5. Thanks!

Hello. I've updated to 1.4.5. However, the problem still exists. Here is the footage of it.

image

The balloon is focused when in the dpad mode.

@DordeDimitrijev
Copy link

@magneticchen Did you manage to solve this issue? I seem to be having the same problem where my balloon has that shadow like in your image?

@TapiocaFox
Copy link

@magneticchen Did you manage to solve this issue? I seem to be having the same problem where my balloon has that shadow like in your image?

Nope. It is still there.

@DordeDimitrijev
Copy link

DordeDimitrijev commented Sep 7, 2022

Does it show always like that for you or sometimes it's ok?

@TapiocaFox
Copy link

Does it show always like that for you or sometimes it's ok?

It only happens when dpad mode is on. (Not in touch mode)

@skydoves
Copy link
Owner

skydoves commented Oct 4, 2022

Hey guys, I'm wondering if you face still the same issue if you request focus to your anchor view after showing the balloon like the below:

val balloon = Balloon.Builder(context)
  .setOnBaclloonInitializedListener {
    anchor.requestFocus()
  }
...

balloon.showAlignBotton(anchor)

Thanks!

@TapiocaFox
Copy link

Hey guys, I'm wondering if you face still the same issue if you request focus to your anchor view after showing the balloon like the below:

val balloon = Balloon.Builder(context)
  .setOnBaclloonInitializedListener {
    anchor.requestFocus()
  }
...

balloon.showAlignBotton(anchor)

Thanks!

Yes. The issue is still happening. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants