title: Load image without cropping in imageview android
body: <p>I created the app to display images in carousel view. I loaded images into imageview which is in another xml layout file &amp; set them in carousel view contain in main xml layout file.</p>
  
  <p>Here how i load imaged into image view</p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent) {
          View vi=convertView;
          if(convertView==null)
              vi = inflater.inflate(R.layout.showsmain, null);
          ImageView image=(ImageView)vi.findViewById(R.id.imageView1);
          //LinearLayout rlayout=(LinearLayout)vi.findViewById(R.id.layout);
         image.setImageResource(R.drawable.black);
          orgWidth = image.getDrawable().getIntrinsicWidth();
          orgHeight = image.getDrawable().getIntrinsicHeight();
          imageLoader.DisplayImage(data[position], image);
          imageLoader.getDimension(widthScreen, heightScreen);
  
          LinearLayout lhome=(LinearLayout)((Activity) activity).findViewById(R.id.layouthome);
  //        LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
  //              widthScreen,heightScreen/3);
          RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
                      widthScreen,heightScreen/3);
          params.width=orgWidth;
              image.setLayoutParams(params);
              image.setScaleType(ImageView.ScaleType.FIT_XY);
  
          return vi;
      }
  </code></pre>
  
  <p>orgWidth is a width of imageview. widthscreen is a width of screen where app is run. below you can see how image is loaded in carousel view.</p>
  
  <p>![enter image description here][1]</p>
  
  <p>here you see image is crop. I want to load the images without crop....</p>
  
  <p>I try to handle this during three days with three question in stackoverflow.
  If anyone can know the answer .....help me</p>
  
  <p>here I also give my carousel layout xml file....</p>
  
  <pre><code>&lt;com.touchmenotapps.carousel.simple.HorizontalCarouselLayout
          android:id="@+id/carousel_layout_event"
          android:layout_width="600dp"
          android:layout_height="500dp"
          android:layout_above="@+id/relativeLayout1"
          android:layout_alignTop="@+id/carousel_layout" &gt;
      &lt;/com.touchmenotapps.carousel.simple.HorizontalCarouselLayout&gt;
  </code></pre>