title: How to set 4 button on one Listener?
body: <p>This is simple method but i don't know the code so i mean is like this</p>
  
  <pre><code>     button1 = (Button)findViewById(R.id.b1);
       button2 = (Button)findViewById(R.id.b2);
       button3 = (Button)findViewById(R.id.b3);
       button4 = (Button)findViewById(R.id.b4);
  
      //button1-button4.setOnClickListener(new View.OnClickListener() {
  
            public void onClick(View Button1-4){
              {
               //Do same method for button1-4
              }
            }
          });
  
       button5 = (Button)findViewById(R.id.b5);
       button6 = (Button)findViewById(R.id.b6);
       button7 = (Button)findViewById(R.id.b7);
       button8 = (Button)findViewById(R.id.b8);
  
      //button5-button8.setOnClickListener(new View.OnClickListener() {
  
            public void onClick(View Button5-8){
              {
               //Do same method for button5-8
              }
            }
          });
  
       button9  = (Button)findViewById(R.id.b9);
       button10 = (Button)findViewById(R.id.b10);
       button11 = (Button)findViewById(R.id.b11);
       button12 = (Button)findViewById(R.id.b12);
  
      //button5-button8.setOnClickListener(new View.OnClickListener() {
  
            public void onClick(View Button9-12){
              {
               //Do same method for button9-12
              }
            }
          });
  </code></pre>
  
  <p>so i have 12 button on my project that i put in 3 group(layout), each group have 4 button inside which i mean the 4 button in each group do same thing.</p>
  
  <p>Can anyone help me to give some sample code? Thank's</p>