How to set buttons in Android?
<p>I have 7 to 8 buttons in my application.</p>

<p>Like this.
<img src="http://i.stack.imgur.com/4v9KN.jpg" alt="alt text"></p>

<p>How can I do this?
I used:</p>

<pre><code>LinearLayout ll = (LinearLayout)findViewById(R.id.searchdialog_layout);

ll.setOrientation(0);

Button btn = new Button(context);
btn.setBackgroundDrawable(getResources().getDrawable(R.drawable.bubble_layout));

btn.setPadding(4,0, 4, 0);

btn.setTextSize(14);

btn.setTextColor(Color.BLACK);

btn.setText("bubble" + " x");

ll.addView(btn) ;
</code></pre>

<p>But it didn't work.</p>

<p>Can anyone help?</p>
