title: How to make toast message when button is clicked
body: <p>I'm creating a quiz. I have 3 buttons (options) in the activity and its corresponding questions. Now, my problem is I want to show the toast message, when the user chose the correct answer the toast message will appear in a few seconds, but when the user choose the wrong answer it will again display the toast message. I do not know how to do that.  </p>
  
  <p>I have done many research and read forums, but seems I don't understand and it don't meet my needs. Can someone please help? thanks in advance!</p>
  
  <p>So far, here is the code. But it doesn't work.<br>
  Please correct me which code is wrong. Thanks deeply.</p>
  
  <pre><code>btn1.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View arg0) {
      // TODO Auto-generated method stub
      Button btn1 = (Button) findViewById(R.id.btnopt1_a);
      btn1.isClickable();
      switch(arg0.getId()){  
        case R.id.btnopt1_a:  
            if(btn1.isPressed()){  
               Toast.makeText(getBaseContext(), "Your answer is correct!" , Toast.LENGTH_SHORT ).show();  
             }  
             else btn1.setText("Your answer is wrong!, The correct answer is: Frog");  
               break;  
             }
        }
      });
  </code></pre>