title: Image doesn't fit ImageView width and height in ViewPager
body: <p>I am getting pictures from Facebook, biggest resolution there is. Around 900 height and 500 width. I am using a View Pager for displaying 6 of them in there. For that, I use the Image Loader since I only save the URL of the images.</p>
  
  <p>I display them in an ImageView with 300 width and 243 height. The issue is that they don't fill up the mentioned size. They only take half of the place most of the cases.</p>
  
  <p>Sure, I can use scaleType : centerCrop to achieve that, but for profile pictures, the output is really ugly.</p>
  
  <p>I would like to get an explanation to why it doesn't work the way I want to. Thank you! Here's some of the code :</p>
  
  <pre><code>public class UserProfileAdapter extends FragmentStatePagerAdapter {
      private List&lt;String&gt; userImages;
  
      public UserProfileAdapter(FragmentManager c, List&lt;String&gt; images){
          super(c);
          userImages = images;
      }
      @Override
      public int getCount() {
          return userImages.size();
      }
  
      @Override
      public Fragment getItem(int position) {
          switch(position) {
              case 0: return UserProfilePictureItem.newInstance(userImages.get(position));
              case 1: return UserProfilePictureItem.newInstance(userImages.get(position));
              case 2: return UserProfilePictureItem.newInstance(userImages.get(position));
              case 3: return UserProfilePictureItem.newInstance(userImages.get(position));
              case 4: return UserProfilePictureItem.newInstance(userImages.get(position));
              case 5: return UserProfilePictureItem.newInstance(userImages.get(position));
          }
          return null;
      }
  }
  
  
  
  public class UserProfilePictureItem extends Fragment {
      public UserProfilePictureItem() {
          //Empty constructor
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View rootView = inflater.inflate(
                  R.layout.layout_user_profile_pic, container, false);
          Bundle args = getArguments();
          String pic_URL = args.getString("pic_URL");
  
          DisplayImageOptions options = new DisplayImageOptions.Builder()
                  .showImageOnLoading(R.drawable.btn_blue)
                  .showImageForEmptyUri(R.drawable.btn_blue)
                  .showImageOnFail(R.drawable.btn_blue)
                  .cacheOnDisk(true)
                  .cacheInMemory(true)
                  .imageScaleType(ImageScaleType.EXACTLY)
                  .considerExifParams(true)
                  .displayer(new SimpleBitmapDisplayer())
                  .build();
  
          ImageView imageView = (ImageView) rootView.findViewById(R.id.profile_user_pic);
          ImageLoader.getInstance().displayImage(pic_URL, imageView, options);
          return rootView;
      }
  
      public static UserProfilePictureItem newInstance(String picture_url) {
          UserProfilePictureItem fragment = new UserProfilePictureItem();
          Bundle args = new Bundle();
          args.putString("pic_URL", picture_url);
          fragment.setArguments(args);
          return fragment;
      }
  }
  </code></pre>
  
  <p>And finally the XML : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"&gt;
  
      &lt;ImageView xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="300dp"
         android:layout_height="243dp"
         android:id="@+id/profile_user_pic"
         android:scaleType="centerCrop"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>