title: Spinner's background image appears stretched
body: <p>I have created a dropdown spinner with a background custom image. I have placed the spinner in a linear layout and <strong>I have aligned items using weight</strong>.</p>
  
  <p>Here is my code -</p>
  
  <p>XML -</p>
  
  <pre><code>&lt;LinearLayout
      android:id="@+id/csbar"
      android:windowSoftInputMode="adjustPan"
      android:paddingTop="8dp"
      android:paddingBottom="8dp"
      android:layout_alignParentBottom="true"
      android:layout_width="match_parent"
      android:background="#101010"
      android:layout_height="wrap_content"&gt;
  
      &lt;ImageButton
          android:id="@+id/run"
          android:layout_width="0dp"
          android:layout_height="@dimen/height"
          android:layout_weight="1"
          android:background="@null"
          android:contentDescription="@string/nul"
          android:src="@drawable/ic_action_play" /&gt;
  
      &lt;ImageButton
          android:id="@+id/save"
          android:layout_width="0dp"
          android:layout_height="@dimen/height"
          android:layout_weight="1"
          android:background="@null"
          android:contentDescription="@string/nul"
          android:src="@drawable/ic_action_save" /&gt;
  
      &lt;Spinner
          android:id="@+id/more"
          android:layout_width="0dp"
          android:layout_weight="1"
          android:background="@drawable/ic_action_sort_by_size"
          android:layout_height="@dimen/height"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Java -</p>
  
  <pre><code>int firstC = 0;
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
  
      /////I have removed rest of the code to make it more legible/////
  
      Spinner more = (Spinner) rootView.findViewById(R.id.more);
  
      ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(getActivity(),
              R.array.more, android.R.layout.simple_spinner_item);
      adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
      more.setAdapter(adapter);
  
      more.setOnItemSelectedListener(this);
  
  }
  
  @Override
  public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position,
          long id) {
      ((TextView)view).setText(null);
  }
  </code></pre>
  
  <p>Here is the output -</p>
  
  <p><img src="https://i.stack.imgur.com/rhGRx.png" alt="stretched"></p>
  
  <p>As you can see the <code>sort by size</code> icon (icon on right) appears stretched.</p>
  
  <p>How I want it to look like -</p>
  
  <p><img src="https://i.stack.imgur.com/pMbgM.png" alt="target"></p>
  
  <p>What is wrong with my code? Please help.</p>