title: Resize image to full width and variable height with Picasso
body: <p>I have a listView with an adapter that contains <code>ImageView</code> of variable size (width and height). I need resize the pictures load with Picasso to the max width of layout and a variable height given by the aspect ratio of the picture.</p>
  
  <p>I have checked this question:
  <a href="https://stackoverflow.com/questions/20823249/resize-image-to-full-width-and-fixed-height-with-picasso">Resize image to full width and fixed height with Picasso</a></p>
  
  <p>The <code>fit()</code> works but I haven't found nothing to keep the aspect ratio of the picture.</p>
  
  <p>This code partially works if I fixed the height in the layout of the adapter:</p>
  
  <pre><code>Picasso.with(this.context).load(message_pic_url)
  .placeholder(R.drawable.profile_wall_picture)
  .fit().centerInside()
  .into(holder.message_picture);
  </code></pre>
  
  <p>But it generates blank spaces between the pictures of the listView because the pictures may be that not have that height.</p>
  
  <p>Thanks in advance.</p>