I have an Activity with some EditText fields and some buttons as a convenience for what normally would be used to populate those fields. However when we the user touches on
I sometimes use a bit of a trick to do just that. I put an invisible focus holder somewhere on the top of the layout. It would be e.g. like this
with this style
and then in onResume I would call
editInvisibleFocusHolder.setInputType(InputType.TYPE_NULL);
editInvisibleFocusHolder.requestFocus();
That works nicely for me from 1.6 up to 4.x