Balloon icon indicating copy to clipboard operation
Balloon copied to clipboard

Whole balloon is focused when displayed initially

Open nvasilev0101 opened this issue 3 years ago • 10 comments

  • 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?

nvasilev0101 avatar Oct 04 '21 18:10 nvasilev0101

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

.setDismissWhenTouchOutside(false)
.setFocusable(false)

skydoves avatar Oct 06 '21 04:10 skydoves

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

nvasilev0101 avatar Oct 06 '21 04:10 nvasilev0101

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

skydoves avatar Jul 16 '22 04:07 skydoves

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.

TapiocaFox avatar Jul 19 '22 10:07 TapiocaFox

@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?

DordeDimitrijev avatar Sep 07 '22 14:09 DordeDimitrijev

@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.

TapiocaFox avatar Sep 07 '22 15:09 TapiocaFox

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

DordeDimitrijev avatar Sep 07 '22 16:09 DordeDimitrijev

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)

TapiocaFox avatar Sep 07 '22 19:09 TapiocaFox

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!

skydoves avatar Oct 04 '22 04:10 skydoves

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. :/

TapiocaFox avatar Oct 05 '22 08:10 TapiocaFox