I've try to close my custom keyboard after click item in gridview.I'm trying to do it in BaseAdapter class. context is come from InputMethodService.
So far I've tried below:
FrameLayout scroll = (FrameLayout)inflater.inflate(R.layout.keyboard, null);
InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(scroll.getWindowToken(), 0);
--
imm.toggleSoftInput(0,InputMethodManager.HIDE_IMPLICIT_ONLY);
--
scroll.setVisibility(View.INVISIBLE);