androidandroid-softkeyboard

How to listener the soft keyboard key event


how to know when I press the delete key from the soft keyboard in android, an event the content of the edittext is empty. I know when the content is not empty, can use TextChangeListener. Only the empty content how to listen the pressed key.


Solution

  • setListener is not worked in same android system. Finally I got a smart idea, which can use a space replace by ImageSpan,and set picture size is 0*0. So there always will not be empty.