how to programmatically hide a button in android sdk
<p>i have a relative layout  which contains two buttons.which are overlapped on each other.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#FFFFFF"&gt;


&lt;Button android:text="Play"  
    android:id="@+id/play"
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom = "true"&gt;
&lt;/Button&gt;

&lt;Button android:text="Stop "
    android:id="@+id/stop" 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content"
    android:layout_alignParentBottom = "true"&gt;
&lt;/Button&gt;


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

<p>I want to to programmatically show only one button at a time when its click event is called.
i tried it with </p>

<blockquote>
  <p>playButton.setVisibility(1);</p>
</blockquote>

<p>but it does not worked.Following is an example what i am trying to do.</p>

<pre><code>    playButton = (Button) findViewById(R.id.play);
    playButton.setVisibility(1);
    playButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
             //when play is clicked show stop button and hide play button

        }
    });
</code></pre>

<p>can someone help me how to do this.</p>

<p>Thanks</p>
