title: EditText in Listview loses focus when pressed on Android 4.x
body: <p>I know there are a lot of similar questions out here
  but I couldn't get any of the provided solutions working in a simple sample app.</p>
  
  <p>The problem occurs when the <strong>softkeyboard</strong> is shown for the first time. As soon as it is shown, only by pressing the <strong>editText</strong> again makes it editable.</p>
  
  <p>Tried the following:</p>
  
  <pre><code> android:windowSoftInputMode="adjustPan|adjustResize"
  </code></pre>
  
  <p>This is not solving any issues. It seems that this line is mandatory to have the activity resized after the softkeyboard is popping up. Unfortunately, it's also causing any <strong>EditTexts</strong> to lose focus. This is probably to the <strong>ListView</strong> itself gaining focus after the resizing process. So I tried the following workaround:</p>
  
  <pre><code> listView.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
  </code></pre>
  
  <p>This always causes the first <strong>visible EditText</strong> that the <code>ListView</code> contains to gain focus, which is undesirable. The second EditText in the second row should instead gain focus when pressed, which is not happening. Also, if I eventually managed to focus another EditText other then the first one shown (e.g. by pressing 'Next' on the <code>softkeyboard</code>), the first visible one will receive focus after the keyboard is dismissed and the ListView being resized to its full size again.</p>
  
  <p>I tried several other things like intercepting <code>onFocusChange()</code> events for the ListView, while knowing which EditText was pressed by its <code>TouchListener</code>. Requesting the focus for that certain EditText again did not lead to any success either.</p>
  
  <p>Using a <code>ScrollView</code> instead of a <code>ListView</code> as suggested by other users is not an option either for the concerned project.</p>