title: Aligning views at runtime in RelativeLayout
body: <p>How do I add a view in relative layout at runtime, so that it aligns itself at the Top of the parent. Say I am adding an EditText on clicking the button. Now this EditText should come in such a way that EditText comes above the Button. </p>
  
  <p>here is an example of what I am doing.</p>
  
  <pre><code>    button = new Button(this);  //here I am just checking if the button can come above the EditText
      button.setText("I am a button");  
      params.addRule(RelativeLayout.BELOW, editText.getId());  
      params.addRule(RelativeLayout.ALIGN_PARENT_ABOVE);  
      relativeLayout.addView(button);  
  </code></pre>
  
  <p>I am not able to make the alignment at all.
  Any clue is highly appreciated.
  Thanks in Advance.</p>