I was trying to hide keyboard on click of a button.
Then I came across this code:
public static void hideKeyboardFrom(Context context, View view) {
InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
My question is what is view.getWindowToken() and what is the significance of it and what does it return.