OnKeyListener Not working

by Guillaume Imbert » Thu, 03 Mar 2011 04:27:50 GMT


Sponsored Links
 Hi

I try to apply treatment onto EditText.
To do so in Android 1.5 a few months ago I used the View.OnKeyListener
interface and everything worked fine.

Now I uploaded my application onto a Android 2.2 device (and also
virtual device) and it doesn't work anymore, except the OK key, that
is still captured.

My EditText is binded to the controller through my Controller
constructor :

       public TextController(EditText textBox) {
                textBox.setOnKeyListener(this);
                boxSize = textBox.getText().toString().length();
                text = textBox.getText().toString();
        }

the onKey method is triggered only while hitting the DEL key and the
OK key

Has anyone already experienced this?

-- 



Other Threads

1. Seeking interested collaborator for creating android alife app

Hey folks, my name is Tony Borodovsky and this is my first post here.

I've been programming multi-agent alife simuations in the NetLogo
language for about 2 years now, and I think that one of my sims would
make a really nice android app - especially considering that there's
currently quite a dearth of alife apps on the android market.

However, I don't currently have the free time to learn the android SKD
myself (I have a 3 month old baby and I work full time). As such, I
was hoping to come to this form and put out the call to see if there
were any android app developers interested in collaborating on
creating an alife app - one for which I've already done most of the
groundwork to get it up and running, I just need help porting the code
over to the android platform.

Is this an appropriate use of this forum? Anybody out there interested
in helping develop an alife ecological sim?

In 30 words or less - the sim I've developed is an autopoetic, self-
stabilizing ecosystem with procedurally generated ecosystem niches.
You start out with 4 identical creatures that eat the freely-available
food, and breed mutant offspring. After a few generations, you get a
broad enough range of mutated creatures that the big fish start eating
the little fish. However, because there are various hunting algorithms
that make the creatures choosy about who they eat, this creates
dynamic ecosystem niches. The ecosystem is open-ended (i.e. it can
create bigger and bigger creatures at the top of the food chain
without destroying the base) and self-stabilizing (runaway population
growth is controlled by constantly evolving predators).

Please ping me on or off list if you're interested.

Alternately - if this is not an appropriate use of this forum, let me
know.
thanks!
ciao down
tonyb

-- 

2. set priorities on icons

Hello Android Developers,

I am trying to figure out how to set priorities on imagebutton.  I
want to have a layout with a bunch of Icon or buttons that can be
selected either by touch, radio, or checked box.  As these images are
selected they are set on queue to be displayed in order of Precedence.
(that is to be pre-determined). The images are displayed once the main
action button is touched.

Any help will be greatly appreciated.

Thank you,

-- 

3. Nexus One Wifi Name

4. Android sync

5. Unparsed aapt error(s)! Check the console for output - yet no errors displayed

6. Bind to system service

7. What xml encodings work for non-europian languages