community
community copied to clipboard
Flickering screen and jumping widgets
Software Versions
- Python: 3.7.6
- OS: Android
- Kivy: was with fork: kivy==5ed7a1335bd66c4365b666eccce049f27ebfc51b and tried with the 2.0.0rc3 release as well.
- Kivy installation method: Buildozer
- Buildozer spec code: https://paste.ofcode.org/HuAyRRRgBzvCLVbAPCnVVw
:Describe the bug
When the notification bar is dragged down and then goes back. Or when the android keyboard appears and disappeares. and also when android navigations buttons being sticked to the screen - The screen does this flickering where all widgets hoping down and up and a white/black flash appears at the top of the screen.
Expected behavior
The screen and widgets to stay stable and not move or resize themselves
Code and Logs and screenshots

I also tried with a simple hello world app - with the latest kivy release I mentioned.

that same bug effect happen when sticking the navigation buttons of android to the screen, theres a kivy app that it doesnt happen with the notifcation bar, but it does happer with the sticking, maybe its all related somehow?

Additional context
The bug occurrs on every screen in the app. Not only in a particular one. The fixes I've tried (for both the apps Ive shown above) are:
- Settling at the Buildozer specs fullscreen to 0 and to 1, without any improvement.
- Ive also tried to set Config.set('graphics' , 'resizeable', False) At the beginning of main.py import code.
- And Ive tried to set a function to Window.on_resize that gives the window the exact size it had when the app was lunched - without any success
You can see my app code at my Fitness App repo. I really appreciate anyone trying to help. Thanks in advance!
These do not look like standard kivy widgets (possibly Kivy MD). Can you reproduce the problem using standard kivy widgets? If not, then it's an issue with the widgets. And if you're using KivyMD, then you should probably log the issue there?
@Matan22g did you ever resolve this? We are having a similar problem. In our case, sometimes the "jumping" never jumps back, and the app is permanently shifted down. it goes away if you try to minimize / restore the app (or pull down the system menu again)
Hi @brentpicasso !
This is happening on multiple devices or only on devices from a specific vendor / vendors?
Hi @brentpicasso !
This is happening on multiple devices or only on devices from a specific vendor / vendors?
Multiple devices; samsung as well as Fire Tablets.
https://user-images.githubusercontent.com/3267533/203146691-5d741ef9-a3b9-4979-b922-90e2104b5e1b.mov
https://user-images.githubusercontent.com/3267533/203146735-60755bed-d70d-43d3-88b9-84791d7fda29.mov
Is that happening on both kivy/python-for-android==master and kivy/python-for-android==develop ?
We can test for this.
Any update on this? Experiencing the same issue
@chisomnriezedi: As you can see, there are lot of unanswered questions that previous experts have asked. Please help by answering them:
Can you reproduce the problem using standard Kivy widgets? What version of kivy/python-for-android are you using?
I'm having this issue also.
From what I understood trying to fixit was:
This only happen when using the buildozer option: fulscreen = 1
Setting fullscreen = 0 and then, with the help of pyjnius, in application code, hidding status and navigation bars, the issue doesn't happen.
You can check https://github.com/rpedroso/kivy_bug_7133. There are 3 branches:
Branch master: minimal kivy app, a Label only, where the issue can be seen. fullscreen = 1 in buildozer
Branch fix: fullscreen = 0 in buildozer Using a Label and changing to fullscreen in "def build:". The jumping doesn't happen. Enter and exit fullscreen can be done with a double tap. The moment of switching we can see a jump.
Branch fix_test_with_textinput: Same as above but with a TextInput
This was not easy to explain in English, but ...