title: Unable to call more than one onclick event for more than one button in android
body: <p>I have small query in android.
  I have one activity in which it has 3 buttons and on one button click I am displaying the AlertDialog box and on second button click I am displaying the List Dialog Box and On 3rd button click I am toggle the OnScreen Key board in android.</p>
  
  <p>my problem is that I was able to call the first button and when I click the 2nd and 3rd button they are not responding and also I have checked by inserting breakpoints on respective click event functions, the control flow is not at all going inside the functions. simple it skips the fun and going to the end of the main OnCreate function.</p>
  
  <p>here is the code I have used for the first 2 buttons...</p>
  
  <pre><code>        Button btn=(Button) findViewById(R.id.button1);
      btn.setOnClickListener(new View.OnClickListener()
      {
          @Override
          public void onClick(View v)
          {
              // TODO Auto-generated method stub
              ShowListDialog();
          }
      });
  
      btn=(Button) findViewById(R.id.btnShowList);
      btn.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              ShowOneDialog();
          }
      });
  </code></pre>
  
  <p>I am calling the functions ShowOneDialog() and ShowListDialog() functions and hope that functions are not needed
  and for the 3rd button click event is here below...</p>
  
  <p>btn=(Button) findViewById(R.id.btnToggle);
          btn.setOnClickListener(new View.OnClickListener() {</p>
  
  <pre><code>        @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              InputMethodManager inmgr=(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
              inmgr.toggleSoftInput(0, 0);
          }
      });
  </code></pre>