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. How to add some button dynamicly aftersetContentView

Haric & 
Thanks very much.

I have used your advice and solve the issue.



Ji




> 

2. Rounded Corners for Color Drawables

Hi,
This page 
http://developer.android.com/guide/topics/resources/available-resources.html#colordrawableresources
says that we can optionally set rounded corners for color rectangles.
Could anyone please tell me how to add the rounded corner
specification in the following code? (I have searched but didnt find
any example)

<resources>
    <drawable name="solid_red">#f00</drawable>
    <drawable name="solid_blue">#0000ff</drawable>
    <drawable name="solid_green">#f0f0</drawable>
</resources>

Thanks,
Saikat

--

3. Listview Text Filer Make Fast

4. StackOverflow, Threads and Stack Sizes

5. How to center a button vertically in LinearLayout?

6. About the initiating process of SurfaceFlinger. Options

7. AlertDialog in Android 1.5 and 2.0 / 2.0.1