mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-21 16:32:39 +00:00
fix keyboard insets attempting to use new apis
This commit is contained in:
1 file changed
+4
@@ -97,6 +97,10 @@ class Cocos2dxGLSurfaceView(context: Context) : GLSurfaceView(context) {
|
|||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.R)
|
@RequiresApi(Build.VERSION_CODES.R)
|
||||||
fun onKeyboardInsets(windowInsets: WindowInsets) {
|
fun onKeyboardInsets(windowInsets: WindowInsets) {
|
||||||
|
if (!cocos2dxGLSurfaceView.sendNewCocosEvents) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val visible = windowInsets.isVisible(WindowInsets.Type.ime())
|
val visible = windowInsets.isVisible(WindowInsets.Type.ime())
|
||||||
val offsetHeight = if (visible) windowInsets.getInsets(WindowInsets.Type.ime()).bottom else 0
|
val offsetHeight = if (visible) windowInsets.getInsets(WindowInsets.Type.ime()).bottom else 0
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user