-1

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

Community
  • 1
  • 1
Reto
  • 1,660
  • 3
  • 19
  • 31
  • I'm trying to figure out what you're doing, but the question is so vague that I can't understand what you're getting at here. Please post a more in depth question, what exactly you're solving with the solution you're "trying", etc... help us help you. – eplewis89 Oct 14 '11 at 20:50
  • There is nothing you can do if the current class does not include that method. Java is not like C where you can `#include` more files to provide more functions. – Dan S Oct 14 '11 at 20:52
  • What is `this` dose it have a `getFields()` method? – slayton Oct 14 '11 at 20:52
  • More information is needed if you want to get a useful answer to this question. – Bobbake4 Oct 14 '11 at 21:12

1 Answers1

2

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.

Squonk
  • 48,735
  • 19
  • 103
  • 135