Button.setEnabled(true) remains greyed
<p>I have an  Activity which is resumed with</p>

<pre><code>@Override
protected void onResume() {
            Log.v(TAG, " onResume() disables the OK button");
    // onAuthentificated will re-enable it
    findViewById(android.R.id.button1).setEnabled(false);
    super.onResume();
}
</code></pre>

<p>Later, the authentification is successful, and my callback is called</p>

<pre><code>@Override
public void onAuthenticated(String username) {
    Log.v(TAG, "user can press button");
    findViewById(android.R.id.button1).setEnabled(true);
    super.onAuthenticated(username);
}
</code></pre>

<p>I know that the <code>setEnabled(true)</code> is called last.</p>

<p>My problem is that the button remains greyed out. What's happening and how can I fix this?</p>

<p>The layout(but it won't help)</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/VerticalLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" &gt;

    &lt;!-- other stuff --&gt; 
    &lt;Button
        android:id="@android:id/button1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:text="@android:string/ok" /&gt;

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

<p>Here are the last lines of logcat</p>

<pre><code>08-30 13:00:45.182: V/ReportActivity(344): onResume() disables the OK button
8-30 13:00:45.382: I/ReportActivity(344): Authentification token callback
08-30 13:00:45.477: D/dalvikvm(344): GC_CONCURRENT freed 324K, 5% free 9960K/10375K, paused 2ms+3ms
08-30 13:00:45.567: D/NetworkService(344): Broadcast the fact user is authenticated
08-30 13:00:45.567: D/ReportActivity(344): user can press button
</code></pre>
