title: How to align a TextView, Spinner and Button in same row in android
body: <p>How to align a TextView, Spinner and Button in same row in android ?</p>
  
  <p>My layout xmls as follows</p>
  
  <pre><code>&lt;LinearLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"  
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical" 
  android:gravity="center"&gt;
  
  
  &lt;LinearLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="horizontal"
       &gt;
  
      &lt;TextView android:id="@+id/textView1" 
          android:layout_width="0dp"
          android:layout_height="wrap_content" 
          android:text="Show"
          android:gravity="center" 
          android:layout_weight="1"
          android:textColor="#CD2134"  
          android:textStyle="bold"  /&gt;
  
  
      &lt;Spinner
          android:id="@+id/spinner1"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="5"
          android:layout_marginBottom="15dp"
          android:prompt="@string/prompt"/&gt;
  
      &lt;Button
          android:id="@+id/button2"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:text="Get"
          android:layout_weight="1"
          android:onClick="button_click"/&gt;
  
  
  &lt;/LinearLayout&gt;
  
  
    &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>output of the above layout as follows</p>
  
  <p><img src="https://i.stack.imgur.com/yqkdt.png" alt="enter image description here"></p>
  
  <p>I want just like below image</p>
  
  <p><img src="https://i.stack.imgur.com/uqpya.png" alt="enter image description here"></p>
  
  <p>thanks in advance</p>