- Have something playing
- Go to the search tab and type something
- Open the Now Playing screen
- Leave the app
- Reopen the app
the keyboard will be shown on top of the Now Playing screen, because the search bar gets focus. This is really annoying
debug-20220815_173710.zip (2.8 KB)
There’s not a lot I can do here, removing the auto show of the keyboard would force users to have to click on the search field and that would be a lot more impacting than you very specific use case.
Isn’t there a way to only focus the search bar if it is actually visible? I can’t believe this is the only way to do it
The search bar could then be focused is the Now Playing screen is swiped down, without loosing any functionality…
It is visible and on screen You can’t see it because your screen is 2D and only shows top to down.
The player is a floating thing above the rest, the UI is still alive behind and reacting to events.
You can’t see it
Sooo, it’s not visible? Visible means the user can see it, doesn’t it? And I would be surprised if there wasn’t some sort of API to check for exactly this
No it does not, and there’s already dozens of opened issue with Compose and keyboards.
And no there’s not really an API for that in compose.
Draw something on a page on a table. Then put a paper in front of your eyes.
Is the page on the table still visible in a generic term ? Yes.
Does the page on the table have a way to know it’s not visible to you ? No.
As said the 2 things are different planes completely not known to each others.
Okay, that’s really sad. I agree that the table can’t know if it’s visible, but a rendered UI definitely can. Isn’t there at least a boolean telling you if the Now Playing screen is open or not?
I can’t believe this is such an outlandish request o.O
Since you are a Compose expert dev and it’s easy why don’t you just show me how incredibly easy this is? …
As said the components are 100% independent are not not aware of each other’s.
Compose have no API AFAIK to know this case either.
Linking them means tight coupling of things that are unrelated this have huge impact on app maintenability so a workaround for a very small side effect of your specific usage of the app would cost hundreds of hours of hours per year.
So one user complaining for a very rare case vs the cost to pay, the choice is easy.
Of course I can choose to fix this the other way and have the now playing auto closed when returning to the app so that you and others are annoyed
I’m not saying it is easy, I’m saying it should be easy. Apparently it’s not, and I am of course not an expert Compose dev. And it seems like you have your reasons for not implementing/fixing this, so I won’t bother you further.
I’m just not convinced I’m the only one encountering this problem. But you’re the dev after all, and I’ll stop wasting your time.