Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add //% QUAD_SURFACE_ON_CREATE_INPUT_CONNECTION to java/MainActivity. #498

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

narodnik
Copy link
Contributor

@narodnik narodnik commented Nov 30, 2024

I need to modify onCreateInputConnection() to return my own InputConnection so I can catch user typing suggestions. Putting this here allows me to return early with my own custom input connection.

//% QUAD_SURFACE_ON_CREATE_INPUT_CONNECTION

Log.i("darkfi", "QuadSurface::onCreateInputConnection() called");

// Needed to fix error: unreachable statement in Java
if (true) {
    outAttrs.inputType = InputType.TYPE_CLASS_TEXT;
    outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE;
    // fullEditor is false, but we might set this to true for enabling
    // text selection, and copy/paste. Lets see.
    return new CustomInputConnection(this, false);
}

//% END

See also not-fl3/cargo-quad-apk#8

I need to modify onCreateInputConnection() to return my own InputConnection so I can catch user typing suggestions. Putting this here allows me to return early with my own custom input connection.
@not-fl3
Copy link
Owner

not-fl3 commented Nov 30, 2024

Thanks for PR!
Lmk if you want me to update the docker/crate/etc :)

@not-fl3 not-fl3 merged commit 55a94c5 into not-fl3:master Nov 30, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants