Intercept back button from soft keyboard
<p>I have the activity with several input fields. When activity started soft keyboard is shown. When back button pressed soft keyboard closes and to close activity I need to press back button one more time. </p>

<p>So the question: is it possible to intercept back button to close soft keyboard and finish activity in one press of back button without creating custom <code>InputMethodService</code>?</p>

<p>P.S.: I know how intercept back button in other cases: <code>onKeyDown()</code> or <code>onBackPressed()</code> but in this case it doesn't works: only second press of back button is intercepted.</p>
