Position dynamically ceated view
<pre><code>    Button b1 = new Button(this);
    b1.setText(R.string.hello);
    RelativeLayout layout1 = (RelativeLayout) findViewById(R.id.top_menu);
    //android:layout_alignParentRight=true
    layout1.addView(b1);
</code></pre>

<p>Is there any way to position b1 in layout1? I want it to float right. Or is the only way to replace the complete layout with a new inflated layout?</p>
