Problems with EditText field not showing up
<p>Am very new to Android programming, so sorry if this is a simple problem.</p>

<p>I'm trying to create a form to input user data, and I keep getting the following error:</p>

<blockquote>
  <p>"Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@6279d588"</p>
</blockquote>

<p>This is what my xml looks like for the layout:</p>

<pre><code>&gt;&lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
&gt;    android:orientation="vertical"
&gt;    android:isScrollContainer="true"
&gt;    android:layout_width="fill_parent"
&gt;    android:layout_height="fill_parent"&gt;"
&gt;    &lt;LinearLayout
&gt;        android:orientation="vertical"
&gt;        android:layout_height="wrap_content"
&gt;        android:layout_width="fill_parent"
&gt;        android:layout_gravity="top"&gt;
&gt;        &lt;TextView
&gt;            android:id="@+id/text"
&gt;            android:layout_width="fill_parent"
&gt;            android:layout_height="wrap_content"
&gt;            android:text="This is a test\nsecond line\n"/&gt;
&gt;       &lt;EditText android:id="@+id/name"
&gt;            android:layout_width="fill_parent"
&gt;            android:layout_height="wrap_content"
&gt;            android:inputType="textPersonName"
&gt;            android:maxLength="30"
&gt;            android:maxLines="1"
&gt;            android:hint="@string/compose_name"&gt;&lt;/EditText&gt;                  
&gt;       &lt;Button
&gt;            android:id="@+id/new_contact_button"
&gt;            android:layout_width="fill_parent"
&gt;            android:layout_height="wrap_content"
&gt;            android:text="@string/submit" /&gt;
&gt;        
&gt;    &lt;/LinearLayout&gt;
&gt;&lt;/ScrollView&gt;
</code></pre>

<p>And here is what my class file looks like:</p>

<pre><code>&gt;    @Override
&gt;    public void onCreate(Bundle savedInstanceState) {
&gt;        super.onCreate(savedInstanceState);
&gt;        setContentView(R.layout.new_contact);
&gt;
&gt;        //Set up handlers for input text
&gt;        //nameField = (EditText) findViewById(R.id.name);
&gt;        //name = nameField.getText().toString();
&gt;
&gt;        final EditText nameField = (EditText) findViewById(R.id.name);
&gt;        nameField.setOnKeyListener(new View.OnKeyListener() {
&gt;            public boolean onKey(View v, int keyCode, KeyEvent event) {
&gt;                if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp;
&gt;                (keyCode == KeyEvent.KEYCODE_ENTER)) {
&gt;                    String strNicknameToSave = nameField.getText().toString();
&gt;                    // TODO: Save Nickname setting (strNicknameToSave)
&gt;                    return true;
&gt;                }
&gt;                return false;
&gt;            }
&gt;        });
&gt;
&gt;        submitButton = (Button) findViewById(R.id.new_contact_button);
&gt;
&gt;        // Set up click listeners for all the buttons
&gt;        submitButton.setOnClickListener(this);
&gt;
&gt;    }
</code></pre>

<p>If I get rid of the EditText field, then it works fine.  Also it ran perfectly just once, but I haven't been able to repeat that (all I did in the meantime was delete another layout that isn't being used).  </p>

<p>Thanks for your help.</p>
