Custom UI object android
<p>Im quite new to android development and in fact also Java. I have created an activity where I have several "rounded corner" transparable gradient-"buttons" that is made up of an absolutelayout, and two texfields. 
Now I want these "buttons" to be added to my screen based on some values in a database. So the UI is dynamic. It must be fetched from DB. So it can be 10 "buttons" and it can be 1 "button".
How can I add these "buttons" dynamically Adding text from DB? and still have click-events etc. This is how the "buttons" are defined in XML: (I have removed some of the elements)
</p>

<p> </p>

<p> 
  

<p>Hope someone out there understands the problem, and are able to help.</p>
