mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-21 08:19:33 +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)
|
||||
fun onKeyboardInsets(windowInsets: WindowInsets) {
|
||||
if (!cocos2dxGLSurfaceView.sendNewCocosEvents) {
|
||||
return
|
||||
}
|
||||
|
||||
val visible = windowInsets.isVisible(WindowInsets.Type.ime())
|
||||
val offsetHeight = if (visible) windowInsets.getInsets(WindowInsets.Type.ime()).bottom else 0
|
||||
|
||||
|
||||
Reference in new issue
Block a user