android-project/build.properties
author Sam Lantinga
Wed, 03 Oct 2012 20:49:16 -0700
changeset 6555 f2c03c06d987
parent 4965 91d0085b7560
permissions -rw-r--r--
Fixed bug 1614 - SDL for Android does not implement TextInput API

Andrey Isakov 2012-10-03 08:30:25 PDT

I've found out in the process of porting one OS project to Android/SDL2 that
there is no support for TextInput events/APIs on Android.
So I implemented some kind of initial support of that feature, and at the very
least it seems to work fine with latin chars input with soft and hardware
keyboards on my Moto Milestone2. I've also tried playing around with more
complex IMEs, like japanese, logging the process and it seemed to work too. I'm
not sure since the app itself I am working on does not have support for
non-latin input.

The main point of the patch is to place a fake input view in the region
specified by SDL_SetTextInputRect and create a custom InputConnection for it.
The reason to make it a separate view is to support Android's pan&scan on input
feature properly. For details please refer to
http://android-developers.blogspot.com/2009/04/updating-applications-for-on-screen.html
Even though the manual states that SetTextInputRect is used to determine the
IME variants position, I thought this would be a proper use for this too.
     1 # This file is used to override default values used by the Ant build system.
     2 # 
     3 # This file must be checked in Version Control Systems, as it is
     4 # integral to the build system of your project.
     5 
     6 # This file is only used by the Ant script.
     7 
     8 # You can use this to override default values such as
     9 #  'source.dir' for the location of your java source folder and
    10 #  'out.dir' for the location of your output folder.
    11 
    12 # You can also use it define how the release builds are signed by declaring
    13 # the following properties:
    14 #  'key.store' for the location of your keystore and
    15 #  'key.alias' for the name of the key to use.
    16 # The password will be asked during the build when you use the 'release' target.
    17