Refreshing a button in Android
<p>I have set a content view in Android with: </p>

<pre><code>setContentView(R.layout.activity_main);
</code></pre>

<p>Now after one of the buttons is clicked, the following code is executed to enable another button:</p>

<pre><code>ok.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                buttonPause.setEnabled(true);
...
</code></pre>

<p>This enables the button. BUT only after a minute or so.</p>

<p>Do I need to refresh the button or layout? Or is that bad practice? I am wondering what causes this delay. I have read about notifyDataSetChanged(), but I do not think that is the right method.</p>
