title: How to add a Hint in spinner in XML
body: <p>I am trying to add a Hint in the spinner widget as there is no option of Hint as in <code>EditText</code>, I want to show Gender as a Hint and when clicked it must show only Male and Female not the hint. </p>
  
  <p>How it can be Done Only Using XML</p>
  
  <p>XML code of spinner.</p>
  
  <pre><code>  &lt;Spinner
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/spinner1"
        android:entries="@array/gender"
        android:layout_marginTop="10dp"
        android:layout_marginLeft="25dp"
        android:layout_marginRight="25dp"
        android:layout_gravity="center_horizontal" /&gt;
  </code></pre>
  
  <p>String Array of the spinner</p>
  
  <pre><code>&lt;string-array name="gender"&gt;
       &lt;item&gt;Male&lt;/item&gt;
       &lt;item&gt;Female&lt;/item&gt;
  &lt;/string-array&gt;
  </code></pre>