Updating TextView
<p>I can't seem to get things to display programatically using text views? I have a main.xml:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
    &gt;
    &lt;TextView android:id="@+id/username"
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content" 
        android:text="Name"
    /&gt;
    &lt;Button android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello, I am a Button" 
    /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>Then in my code, I use:</p>

<pre><code>//Update the GUI
setContentView(R.layout.main);
TextView guiStr;
guiStr = (TextView)findViewById(R.id.username);
guiStr.setText(username);
</code></pre>

<p>But the username does not display on the screen. I get just the default text in the XML. What am I doing wrong?</p>
