title: if condition to check background color of button
body: <pre><code>                        if (buttons[2][2].getPaint().getColor()==color){
                              buttons[2][2].setEnabled(false);
                          }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>        buttons[2][2].setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              buttons[2][2].setBackgroundDrawable(new PaintDrawable(Color.YELLOW));
              PaintDrawable drawable = (PaintDrawable) buttons[2][2].getBackground();
              color = drawable.getPaint().getColor();
  
          }
      });
  </code></pre>
  
  <p>i have set background color of button but when i check it does not work</p>