corona
corona copied to clipboard
Android: Native textFields don't appear on Android 10 before app deactivation / reactivation
- [x] I tried searching Solar2D forums for the solution.
Describe the bug I have recently migrated from Corona Native to Solar2D Native for my project, and facing an issue with TextField components on Android 10.
The expected behaviour is: to have them in place when a Scene gets loaded (it works on Android 8)
What happens: is that Initially, they don't appear on Android 10, after locking the device and unlocking it, they start working and appear. A temporary switch to another app and returning back also has the same effect and makes them start working.
To Reproduce Steps to reproduce the behaviour:
- Use text fields in the code
- Build with Solar2D Native project template
- Install on the device and run
- Lock the device and unlock and see how they start working again
Target platform and where build was made:
-
Device: Samsung Note 10
-
OS: Android 10
-
Gradle Target SDK: 29
-
Build Framework: Solar2D-2020.3627 on macOS Catalina
I have managed to use a workaround. Since the Pause and Resume of CoronaActivity would fix the issue, I've created an empty android activity in the native code, display it and finish it immediately. This is not noticeable on the user side but fixes the issue. The real root cause should still be investigated.