title: Define FlatButton setOnClickListener in ADT
body: <p>I am using <a href="https://github.com/eluleci/FlatUI" rel="nofollow">GitHub</a> FlatUI classes for my application UI. I have successfully generated my layout with <code>FlatButtons</code> and now I want to set listener for these buttons. As mentioned in FlatUI sample code, I define my buttons in activity for example as :</p>
  
  <pre><code>flatButtons.add((FlatButton) findViewById(R.id.buttonCat));
  </code></pre>
  
  <p>And of course I have declared an array for all <code>FlatButtons</code> as : </p>
  
  <pre><code>private ArrayList&lt;FlatButton&gt; flatButtons = new ArrayList&lt;FlatButton&gt;();
  </code></pre>
  
  <p>My question is how I can set listener for this button? <code>buttonCat</code> is the <code>button id</code> of my FlatButton in xml Layout, so I guess I should define a new <code>FlatButton</code> somewhere in my activity class and refer <code>buttonCat</code> to that. But how?</p>