title: Android Center Crop Image Not working on device but working in Eclipse
body: <p>I have a list view with an image background for each list item. I am trying to set the src by downloading an image from a given url. I need to center crop the ImageView view so that the image occupies the entire screen (width and height). </p>
  
  <p>This is the XML for my list item: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/list_item"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;ImageView
          android:id="@+id/img_askers_collage"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:adjustViewBounds="true"
          android:scaleType="centerCrop"/&gt;
  
      &lt;LinearLayout
          android:id="@+id/ll_question_text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:layout_marginBottom="40dp"
          android:layout_marginTop="50dp"
          android:gravity="center"
          android:orientation="vertical" &gt;
  
          &lt;me.frankly.view.BariolBoldTextView
              android:id="@+id/question_text"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="5dp"
              android:layout_marginLeft="@dimen/activity_horizontal_margin"
              android:layout_marginRight="@dimen/activity_horizontal_margin"
              android:gravity="center"
              android:textColor="@color/white_pure"
              android:textSize="22sp" /&gt;
  
          &lt;RelativeLayout
              android:id="@+id/author_text"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="10dp" &gt;
  
              &lt;me.frankly.view.BariolTextView
                  android:id="@+id/leading_text_author"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="@string/leading_text_author"
                  android:textColor="@color/white_pure"
                  android:textSize="17sp" /&gt;
  
              &lt;me.frankly.view.BariolTextView
                  android:id="@+id/question_author_name"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_toRightOf="@id/leading_text_author"
                  android:paddingLeft="5dp"
                  android:textColor="@color/comment_username"
                  android:textSize="17sp" /&gt;
          &lt;/RelativeLayout&gt;
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>This is the main activity layout: </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="match_parent"
      android:layout_height="match_parent"
      android:background="@color/default_background" &gt;
  
      &lt;include
          android:id="@+id/answer_question_action_bar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          layout="@layout/action_bar_backbtn_text" /&gt;
  
      &lt;View
          android:id="@+id/view_answer_question"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@id/answer_question_action_bar"
          android:layout_alignTop="@id/answer_question_action_bar" &gt;
      &lt;/View&gt;
  
      &lt;ListView
          android:id="@+id/asked_question_list"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_below="@id/view_answer_question"
          android:cacheColorHint="#00000000"
          android:divider="@null"
          android:dividerHeight="0dp" &gt;
      &lt;/ListView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And this is the snippet which sets the image inside getView of the Adapter, ImageLoader is from UIL:</p>
  
  <pre><code>ImageLoader.getInstance().loadImage(askersCollageUrl, new ImageLoadingListener() {
  
                      @Override
                      public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {
  
                          if (holder.askersCollageUrl.equals(arg0)) {
                          Drawable d = new BitmapDrawable(mcontext.getResources(), arg2);
  
                              holder.collageImageView.setImageDrawable(d) ; 
  
  
                          }
                      }
  
                  //Omitting other methods heere
  
                  });
  </code></pre>
  
  <p>This is expected: 
  <img src="https://i.stack.imgur.com/Qr5Dz.png" alt="enter image description here"></p>
  
  <p>This is what I get:
  <img src="https://i.stack.imgur.com/qoi6W.png" alt="enter image description here"></p>