Improve the hack to hide the keyboard in NumberPreference