title: Android. ImageButton, stretch background and center src
body: <p>I have a ImageButton with 2 images</p>
  
  <p>What I need from this imagebutton if having the backgrounf image to stretch, etc the src image to be centered in the stretched button)</p>
  
  <ul>
  <li>The background image(textured gray) to stretch between 2 ImageButton</li>
  <li>The src image("Title") to be centered on this button.</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/eYNmn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eYNmn.png" alt="enter image description here"></a></p>
  
  <p>Still 2 problems:
  1- Background stretch seem to work, but only if I replace layout_width="wrap_content" with layout_width="fill_parent", BUT, the button doesn't from before the other button.
  2- even with fill parent, i get the src image also stretched.</p>
  
  <p>Suggestions welcome!</p>
  
  <p>xml:</p>
  
  <pre><code>&lt;ImageButton android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/btnListviewHeader_Title"
      android:background="@drawable/a_btn_sort_title"
      android:onClick="listView_FilterBy_Title"
      android:nestedScrollingEnabled="true"
      android:adjustViewBounds="true"
  
  android:scaleType="fitXY"
  android:layout_alignBottom="@+id/btnListviewHeader_Number"
  android:cropToPadding="true"
  android:src="@drawable/a_btn_sort_title_en"
  android:layout_alignTop="@+id/btnListviewHeader_Number"
  android:layout_toLeftOf="@+id/btnListviewHeader_Fav"
  android:layout_toRightOf="@+id/btnListviewHeader_Number"
  android:layout_toEndOf="@+id/btnListviewHeader_Number" /&gt;
  </code></pre>