Phone keyboard overlap app screen

hi @AyanDeveloper,
can you guide me how to use this block ya?
thanks!

:red_question_mark:

No, definitely nobody can do that. :wink:

@AyanDeveloper,
so i insert into anywhere in the line?

hi @bodymindpower,
thanks for the heads up!

Apologies, I just added the manifest :sweat_smile: and didn’t modify the Java code at all; it’s the default. I tested it this morning on an Android 15 device, and it didn’t work. The changes need to be made in the manifest.

in all activity add this. line

1 Like

@Diego please fix this issue in new update so we don’t need this kind of temporary solutions

1 Like

won’t work either :face_without_mouth:

I think we should wait for Kodular team to release another update

Try this (should work on all Android versions, regardless of whether the Title, StatusBar and/or Navbar is visible or not). Tested on Android 16 und 11 (Companion & APK).

TextboxOverlap.apk (5.5 MB)

Blocks

1 Like

How can we do this

Definitely it need to be added In extension and use it

package com.keyboardfix;

import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import androidx.core.view.WindowInsetsCompat;
import androidx.core.view.WindowInsetsAnimationCompat;
import androidx.core.view.ViewCompat;

import com.google.appinventor.components.annotations.;
import com.google.appinventor.components.runtime.
;

@DesignerComponent(
version = 1,
description = “Fix keyboard overlap on Android 13–15”,
category = ComponentCategory.EXTENSION,
nonVisible = true
)
@SimpleObject(external = true)
public class KeyboardFix extends AndroidNonvisibleComponent {

private final Activity activity;

public KeyboardFix(ComponentContainer container) {
    super(container.$form());
    this.activity = container.$context();
}

@SimpleFunction(description = "Enable keyboard fix")
public void EnableFix() {
    final View root = activity.findViewById(android.R.id.content);

    ViewCompat.setOnApplyWindowInsetsListener(root, (v, insets) -> {
        int imeHeight = insets.getInsets(WindowInsetsCompat.Type.ime()).bottom;
        int sysBottom = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom;

        v.setPadding(
                v.getPaddingLeft(),
                v.getPaddingTop(),
                v.getPaddingRight(),
                Math.max(imeHeight, sysBottom)
        );

        return insets;
    });
}

}

Maybe try it like this :hugs::hugs:

1 Like

This happens because Android 15 changed how the keyboard (IME) handles screen insets, so apps that still rely on the old adjustResize behavior (which worked fine on Android 11) no longer automatically move their layout upward when the keyboard appears; the app must now explicitly support the newer WindowInsets/WindowInsetsCompat APIs, otherwise the keyboard will overlap the screen—so if you’re a user it’s the app’s compatibility issue (try switching to 3-button navigation or enabling “resize app to fit screen”), and if you’re a developer you need to update your layout to handle the new inset behavior.

I responded to your last posts then you deleted and reposted the same thing? Why?


Here I leave an extension made entirely by AI. I spent 2 hours calling chatgpt stupid until it provided me with something that worked. Anyone who wants to decompile and improve, feel free. Events don’t work. I’m not a developer so I have no idea how it works. But maybe it can help.

Teste7.aix (8.4 KB)
I haven’t done much testing, so I don’t know which devices this works or doesn’t work on.
If I’m talking nonsense, don’t judge me, I just want to help

2 Likes

But you try @Como_Nao_Jogar_LoL … This is meaningful :heart:

Has anyone tested this extension so far?

Yes, the extension shifts everything above the textbox upwards, which can lead to an unsightly overlap of the action and status bars. The extension’s two events are not triggered. Likewise, the single method doesn’t need to be used and set to true. Simply dragging the extension onto the screen is sufficient.

Here’s an example of how it should work (regardless of the bug on Android 15+ where, with the action bar hidden, the status bar no longer has a height (28 dp) but is instead covered by the app).

Android 16:

TextboxOverlap_new.apk (5.5 MB)

The App should work on all Android versions.

1 Like

all the codes i input in the app are for test and not a real one ya.
the testing app is loaded with the extension from @Como_Nao_Jogar_LoL


above is my android 11 phone, and the app can behave nicely.


while this one is my another android 15 phone, where you can see some pages not behaving the same in my android 11 phone.
now another new issue is where the app size taking the whole phone, and now screen overlap after keyboard kinda solved. :sweat_smile: