Viewflipper onclick not working
<p>Scenario:  I have a view lobby4.xml which has a ViewFlipper and two RelativeLayout within it.
Both relativelayouts have a button called buttonTOG which I want to use to flip from one relativelayout to the other.  Here is the code:</p>

<pre><code>    @Override
public void onCreate(Bundle savedInstanceState) {


  super.onCreate(savedInstanceState);
  setContentView(R.layout.lobby4);
  Context context = getApplicationContext();
  final ViewFlipper vf = (ViewFlipper) findViewById( R.id.viewFlipper );
  bTOG=(Button)findViewById(R.id.buttonTOG);
  final Activity the_a = this;
  final Context static_ctx = this.getApplicationContext();
    bTOG.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
          String buttons=bTOG.getText().toString();
          bTOG=(Button)findViewById(R.id.buttonTOG);
          String mystring = getResources().getString(R.string.Playbyemail);
          if( buttons!=null &amp;&amp; buttons.compareTo(mystring)==0){
              vf.showPrevious();  
          }else{
              vf.showNext();  
          }


      }
    });


}
</code></pre>

<p>When I click the second time on bTOG there is no onClick event.  So I guess I must register onclick?</p>
