title: Scale and crop image in XML
body: <p>I'm trying to scale and crop image at the same time and show it from left to right screen edge. I receive image that is just little bit wider than users screen and I'm able to scale it like this (XML):</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/category_image_top"
          android:layout_width="match_parent"
          android:layout_height="170dp"
          android:maxHeight="170dp"
          android:scaleType="centerCrop"
          android:adjustViewBounds="true" 
          android:focusable="false"
          /&gt;
  </code></pre>
  
  <p>But this is what I get:
  <img src="https://i.stack.imgur.com/wjopo.gif" alt="What I get"></p>
  
  <p>I would like to align image to top right like so:
  <img src="https://i.stack.imgur.com/FuFmL.gif" alt="What I want"></p>
  
  <p>Is this possible? I've tried all scaleTypes but noting works, image is either scaled to fit by X and Y (fitXY, fitStart) or image cropped but centered (centerCrop). I need something like android:scaleType="cropStart"</p>