import android.content.Context;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
class Main {
public static void hideKeyboard(Context context, EditText input)
{
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(input.getWindowToken(), 0);
}
}