corona icon indicating copy to clipboard operation
corona copied to clipboard

Android: Native textFields don't appear on Android 10 before app deactivation / reactivation

Open nadalizadeh opened this issue 4 years ago • 1 comments

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:

  1. Use text fields in the code
  2. Build with Solar2D Native project template
  3. Install on the device and run
  4. 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

Before After

nadalizadeh avatar Dec 08 '20 21:12 nadalizadeh

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.

nadalizadeh avatar Feb 21 '21 23:02 nadalizadeh