I get a null pointer exception at this row:
public void hideKeyboard(){ InputMethodManager inputManager = (InputMethodManager) this.
try this:
public void hideKeyboard(){ InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0); }