title: Android: Align text in center of spinner
body: <p>Maybe you will see something that i didn't. I don't understand why it refuses to align. I have 2 spinners in layout and tried to align text to center.
  In both spinners, the text is aligned to the left. 
  Here is the code.</p>
  
  <p>Xml code :</p>
  
  <pre><code>&lt;LinearLayout
         android:layout_width="fill_parent"
         android:layout_height="36dp"
         android:background="@color/orange"
         android:gravity="bottom|center_vertical" &gt;
  
         &lt;Spinner
             android:id="@+id/sub_from_category"
             android:layout_width="wrap_content"
             android:layout_gravity="center"
             android:layout_weight="2"
             android:layout_height="35dp"
             android:background="@drawable/spinners" /&gt;
  
         &lt;View
             android:layout_width="2dp"
             android:layout_height="wrap_content"
             android:layout_weight="0"
             android:layout_marginLeft="1dp"
             android:layout_marginRight="1dp"
             android:background="@android:color/darker_gray" /&gt;
  
         &lt;Spinner
             android:id="@+id/sub_to_category"
             android:layout_width="wrap_content"
             android:layout_gravity="center"
             android:layout_weight="2"  
             android:layout_height="35dp"
             android:background="@drawable/spinners" /&gt;
     &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>xml code :</p>
  
  <pre><code>&lt;TextView
      android:id="@+id/spinnerTarget"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:textColor="#454545"
      android:background="@color/orange"
      android:textSize="1/&gt;
  </code></pre>
  
  <p>And Java Activity :</p>
  
  <pre><code>subFromCategory = (Spinner)findViewById(R.id.sub_from_category);
          subToCategory = (Spinner)findViewById(R.id.sub_to_category);
  
  
          ArrayAdapter&lt;String&gt; adapterF = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item,Angle);
          adapterF.setDropDownViewResource(R.layout.sub_spinner);
          subFromCategory.setAdapter(adapterF);
  
          ArrayAdapter&lt;String&gt; adapterT = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item,Angle);
          adapterT.setDropDownViewResource(R.layout.sub_spinner);
          subToCategory.setAdapter(adapterT);
  </code></pre>
  
  <p>Thank you,
  Niro</p>