最近有个小需求,要求默认编辑框editText不弹出键盘。尝试通过clearFocus方式处理,发现不work。查了下资料原因如下:
Note: When a View clears focus the framework is trying to give focus to the first focusable View from the top. Hence, if this View is the first from the top that can take focus, then all callbacks related to clearing focus will be invoked after which the framework will give focus to this view.
参考了网上的解决方式为:在EditText的父布局中拦截掉: android:focusableInTouchMode="true"
大家若有什么好的处理方式,还请不吝赐教哈。