I wanted to try the solution posted by htafoya here: How to hide soft keyboard on android after clicking outside EditText?
However
this.getFields();
is not recognized. What do I have to include or change so getFields is known?
Thanks
I wanted to try the solution posted by htafoya here: How to hide soft keyboard on android after clicking outside EditText?
However
this.getFields();
is not recognized. What do I have to include or change so getFields is known?
Thanks
Quoting from the accepted answer (to the question you link to)...
I also finished by creating a method to get all the editTexts per view
In short, the OP of that question created a method in his/her Activity
called getFields()
which returns an array of all EditText
objects in the Activity
. This can be understood from the quote I post above and from this line in the code he/she posted...
EditText[] textFields = this.getFields();
You will need to define your own method to create / return an EditText
array in order for the solution to work.