title: Android: Detect When Soft Keyboard Is About to Show?
body: <p>Is there a way to detect when the keyboard is about to be presented in Android?</p>
  
  <p>My problem is that I have a ListView with EditTexts in it.  When the keyboard is about to be presented, these are quite often redrawn, causing an EditText that was JUST tapped to lose focus and require an extra tap.</p>
  
  <p>My proposed solution is to monitor when the keyboard is about to be shown, check to see which view currently has focus, then after the keyboard is done being shown, restore focus to that view.</p>
  
  <p>However, I have no idea how to detect when the keyboard is "about to be shown" in Android.  How would I do this?</p>
  
  <p>(I would also accept an alternative answer that addresses my actual problem: EditText losing focus when keyboard is displayed)</p>