Kivy window not changing size on android

66 views
Skip to first unread message

Glasses Freak

unread,
Sep 12, 2023, 5:38:25 PM9/12/23
to Kivy users support
So the app works fine on windows but after compiling it to android through buildozer, trying to run it produces a black screen and logcat returns this error on startup:

[SurfaceView[kcb_sinner.kcb/org.kivy.android.PythonActivity]#1]9f:0,a:0) rejecting buffer:active_size=720x1280, requested_size=720x1280 buffer{size=720x1184 transform=0}

I've tried adjusting the config and using Window.size to adjust the screen and both changes affect the size on my computer but on my phone and the emulator I use it's the same no matter what. Any help would be appreciated.
main.py

Robert

unread,
Sep 12, 2023, 5:48:39 PM9/12/23
to Kivy users support
Setting the window size makes no sense on an OS that does not use the desktop metaphor.
Setting the window size either does nothing, or nothing good.

Glasses Freak

unread,
Sep 12, 2023, 10:26:58 PM9/12/23
to Kivy users support
So what should I use instead

Robert

unread,
Sep 12, 2023, 11:08:09 PM9/12/23
to Kivy users support
Since the OS is not windowed and the app fills the screen, it seems like the app is trying to set the aspect ratio of the device, but this is a physical property of the device. So its hard to imagine what "instead" could be, as the premise seems non-physical.

Some reading https://github.com/Android-for-Python/Android-for-Python-Users#layout

What you are trying to achieve?

Glasses Freak

unread,
Sep 13, 2023, 11:50:15 AM9/13/23
to Kivy users support
I'm trying to manually set the size of the window so that the error provided in the initial post won't occur and the app will display.

Robert

unread,
Sep 13, 2023, 12:52:54 PM9/13/23
to Kivy users support
So the issue is a black screen, and this stuff with Window.size was your attempted workaround?

Glasses Freak

unread,
Sep 13, 2023, 3:37:26 PM9/13/23
to Kivy users support
Yes.

Robert

unread,
Sep 13, 2023, 5:07:07 PM9/13/23
to Kivy users support
OK I don't know why that would happen, the only time I have seen that is occasionally when returning from a full screen dialog such as chooser, which is basically resume not a start. The symptom in that case is the buttons work, you just can't see them.

I'm in this thread because I thought I was addressing a different question. 
So I don't have a suggestion.
Reply all
Reply to author
Forward
0 new messages