title: Need help centering an EditText in a Linear Layout
body: <p>I'm trying to center an edittext vertically and horizontally in a linear layout, but it is not working.  Very simple problem really.</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical" 
   android:background="@drawable/login"&gt;
  
  
  
  &lt;EditText
      android:layout_width="150dp"
      android:layout_height="wrap_content"
      android:background="@drawable/loginbutton"
      android:text="Username"
      android:layout_gravity="center"
      android:textSize="25dp"
      android:gravity="center_horizontal|center_vertical"
      android:textColor="#000000"
      android:layout_margin="10dp"
      android:id="@+id/username"&gt;
    &lt;/EditText&gt;
  </code></pre>
  
  <p>I'll try changing to a relativelayout in the mean time.</p>