title: how to use visible and invisible for a button in android
body: <p>I want to make a button invisible, when i click another button then the invisible button will become visible and then perform <code>onClick()</code> actions on the visible button.</p>
  
  <p>What <code>onClick()</code> actions I can use on the visible button. I used this method shown below:</p>
  
  <pre><code>   donebutton = (Button) findViewById(R.id.done);
      donebutton.setOnClickListener(this);
      donebutton.setVisibility(View.INVISIBLE);
  
      @Override
       public void onClick(View v) {
      // TODO Auto-generated method stub
           if(v.equals(remove))
             {
               donebutton.setVisibility(View.VISIBLE);
             }
          if(v.equals(donebutton))
              {
                  Intent i=new Intent(One.this,Second.class);
                  startActivity(i);
                  finish();
                  donebutton.setVisibility(View.INVISIBLE);
              }
  
        }
  </code></pre>
  
  <p>In the above method the invisible and visible propertyes are working but <code>onClick()</code> action is not working. so please tell me an answer for the above problem or tell me if there is any other method for visible and invisible on button and onclick action on that button.</p>
  
  <p>and I also used this method:</p>
  
  <pre><code>       done.setClickable(true);
         done.setOnClickListener(new OnClickListener(){
           public void onClick(View v) {
              Intent i=new Intent(One.this,Second.class);
              startActivity(i);
              finish();
           }
       });
  </code></pre>