Hi, I need to pop a software keyboard and listen by the TextWatcher interface which is optimal for my purposes. I don't want any widget do be displayed, I need to do the things by myself. I found how to do that without displaying an EditText widget instance. My idea is to create EditText widget and keep it hidden.
EditText e = (EditText) ((Activity)vv.getContext()).findViewById(R.id.native_input); AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams (100,100,10,10); e.setVisibility(INVISIBLE); e.addTextChangedListener(new MyTextWatcher()); This does not work. TextWatcher is not called. So, it seems the widget must be visible. To keep it hidden I decided to set its size to be (0,0,0,0) EditText e = (EditText) ((Activity)vv.getContext()).findViewById(R.id.native_input); AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams (0,0,0,0); e.setVisibility(VISIBLE); e.addTextChangedListener(new MyTextWatcher()); This "works" but it has a problem. "Del" key and numbers do not work. Hmmm, strange. WTF? EditText e = (EditText) ((Activity)vv.getContext()).findViewById(R.id.native_input); AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams (1,0,0,0); e.setVisibility(VISIBLE); e.addTextChangedListener(new MyTextWatcher()); and this seems to be ok. Well, I don't think, this is a correct solution. Any idea how to do this by a clear way? Also, why numbers do not work when "...LayoutParams (0,0,0,0);"? Thanks, Ondrej -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

