title: Android - layout width/height percentage of a screen?
body: <p>I was testing out B4A (<a href="http://www.basic4ppc.com/" rel="nofollow">Basic4Android</a>) and there's something called a "designer script", this basically allows you to position elements on a screen.
  For example:<br>
  <code>TextBox1.setTopAndBottom(0%y, 50%y)</code><br>
  <code>TextBox1.setLeftAndRight(0%x, 50%x)</code><br></p>
  
  <p>When this script runs it will automatically position the TextBox1 on the screen, imagine the the screen is 100 pixels by 100 pixels (100x100), the TextBox1 will be placed at (0, 0) (top left), (50, 50) (bottom right).</p>
  
  <p>How can I achieve something like this in Eclipse?<br>
  I can't figure it out. I want to position an element (TextBox1 for example) to fit 25% of the width and 50% of the height for example. How do I achieve this?<br></p>