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

extra characters in textinput on Android #247

Closed
wjanssen opened this issue Jun 2, 2014 · 2 comments
Closed

extra characters in textinput on Android #247

wjanssen opened this issue Jun 2, 2014 · 2 comments

Comments

@wjanssen
Copy link

wjanssen commented Jun 2, 2014

Popping up a textinput on Android seems to start with several non-printing characters (they display as rectangles). Additionally, touching a textinput on Android to give it focus seems to inject some non-printing characters into it.

Details:

Buildozer 0.11-dev

When I run git log on the .buildozer/android/platform/python-for-android/ subdir, I see this:

commit 1b55914
Merge: ce48650 df55cf7
Author: Mathieu Virbel [email protected]
Date: Sat May 3 16:38:54 2014 +0200

Merge pull request #205 from kivy/keyboard_height

Introduce method `get_keyboard_height` that returns current softkeyboard

The kivy version is 1.8.0.

I'm using the provided Ubuntu VM.

@wjanssen
Copy link
Author

wjanssen commented Jun 2, 2014

I wrote a little app to see what the extra characters are. They are chr(4). 0x04.

So I suspect the lines

 +        // add a listener for the layout chnages to the IME view
 +        final android.view.View activityRootView = mActivity.getWindow().getDecorView();
 +        activityRootView.getViewTreeObserver().addOnGlobalLayoutListener(new android.view.ViewTreeObserver.OnGlobalLayoutListener() {
 +            @Override
 +            public void onGlobalLayout() {
 +                //send control sequence start /x04 == kayboard layout changed
 +                nativeKey(45, 1, 4);
 +                nativeKey(45, 0, 4);
 +                }
 +            });

from commit 1b55914

@akshayaurora
Copy link
Member

This has been fixed by 93058cf, follow these steps:

rm ~/.buildozer/android/packages/kivy-stable.zip
bulldozer android clean
Now re-build your apk

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

No branches or pull requests

2 participants