Question

I would like to retrieve values (keys) from the IME of android, though I'm unable to find the starting point, how to connect it with my application.

I'm building a custom view. Therefore any recommendations concerning TextView, EditView won't help. Any ideas how to do it? for example just outputting it to LogCat.

Was it helpful?

Solution

I didn't find any solution that would work directly with Android's IME. So I've made a little trick by subclassing an EditText that implements TextWatcher. If require to input some data I use addContentView (specifying layer parameters of 1x1 px) together with requestFocus on the EditText class and it calls for the IME for me that shoots values via the TextWatcher interface.

Hope this is going to help people who had stumbled upon this uneasy task.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top