How to get screen width and height on Android Device?
-
I want set Korge size equals screen size like this:
suspend fun main() = Korge(width = screenWitdh, height = screenHeight, bgcolor = Colors["#ffffff"]) { // ... }
But I don't know how to get the size from Android devices.
-
The width and height are the ones you request for devices width windows. Mostly desktop. On the other targets like JavaScript, Android and Native, those numbers are ignored, then you use the virtualWidth and virtualHeight.
Please, read this page explaining all the details: https://korlibs.soywiz.com/korge/resolutions/
-
@soywiz Thanks, I will continue to try use korge