How i detemine Button (x,y) cords in Layout?
<p>I Have this simple Code:</p>

<pre><code>    layout = new RelativeLayout(this);
    bottom = new LinearLayout(this);
    Button close = new Button(this);
    close.setText("Close");
    bottom.addView(close);
    layout.addView(bottom);
    setContentView(layout);
</code></pre>

<ul>
<li><p>How can i put my button at the bottom of the window i prefer to determine the x,y cords  but any solution will be good.
since the absoluteLayout is deprecated i tried using the Relativelayout as the api adviced with no succes.</p></li>
<li><p>i'm not using XML at all is that a problem ?</p></li>
</ul>
