Merge pull request #88351 from BZ1234567890/issue-87059-master

[Android 14] Fix GodotEditText white box showing during editor load
This commit is contained in:
Rémi Verschelde 2024-02-15 15:45:23 +01:00
commit fba467c5b7
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -37,6 +37,7 @@ import android.content.*
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.content.res.Resources
import android.graphics.Color
import android.graphics.Rect
import android.hardware.Sensor
import android.hardware.SensorEvent
@ -379,6 +380,8 @@ class Godot(private val context: Context) : SensorEventListener {
ViewGroup.LayoutParams.MATCH_PARENT,
activity.resources.getDimension(R.dimen.text_edit_height).toInt()
)
// Prevent GodotEditText from showing on splash screen on devices with Android 14 or newer.
editText.setBackgroundColor(Color.TRANSPARENT)
// ...add to FrameLayout
containerLayout?.addView(editText)
renderView = if (usesVulkan()) {