Ocultar teclado suave al presionar la tecla de retorno

He buscado media docena de otras respuestas en SO, pero no he encontrado una que funcione. Todo lo que intento hacer es cerrar el teclado virtual cuando el usuario presiona el botón Intro. (El equivalente de la llamada increíblemente fácil de iOS 'resignKeyboard'.) En el siguiente código, no se llama al método onEditorAction. He configurado una vista EditText en mi archivo XML y el código en mi fragmento es el siguiente:

@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        fragView = inflater.inflate(R.layout.fragment_encrypt2, container, false);
        textField = (EditText) fragView.findViewById(R.id.textField);

        textField.setOnEditorActionListener(new TextView.OnEditorActionListener() {

            @Override
            public boolean onEditorAction(TextView arg0, int actionId,
                                          KeyEvent arg2) {
                // hide the keyboard and search the web when the enter key
                // button is pressed
                if (actionId == EditorInfo.IME_ACTION_GO
                        || actionId == EditorInfo.IME_ACTION_DONE
                        || actionId == EditorInfo.IME_ACTION_NEXT
                        || actionId == EditorInfo.IME_ACTION_SEND
                        || actionId == EditorInfo.IME_ACTION_SEARCH
                        || (arg2.getAction() == KeyEvent.KEYCODE_ENTER)) {
                    InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
                    imm.hideSoftInputFromWindow(textField.getWindowToken(), 0);

                    return true;
                }
                return false;
            }
        });

        // Inflate the layout for this fragment
        return fragView;//inflater.inflate(R.layout.fragment_encrypt2, container, false);
    }

El siguiente es un fragmento del archivo XML donde defino el campo EditText. Necesito EditText para ser multilínea.

<EditText
            android:id="@+id/textField"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:hint="@string/Encrypted_Text_Hint"
            android:gravity="top"
            android:inputType="textMultiLine"
            android:imeOptions="actionDone"/>

Respuestas a la pregunta(8)

Su respuesta a la pregunta