1

I am using Universal Image Loader in my app.

It is the best libary to download images, but I have one problem.

I download images that they are smaller than width of device.

I need the image have width = device width and scaled height.

Any idea how I can do this?

4
  • Just check for the property android:scaleType="fitXY" Commented Apr 11, 2014 at 7:13
  • You can use android:scaleType="fitXY" or android:scaleType="centerCrop" for your ImageView. Commented Apr 11, 2014 at 7:20
  • Have you got what you want to achieve @Unmerciful ???? Commented Apr 11, 2014 at 9:47
  • fitXY wrong scaling when image resolution is smalerr than device width. center cropp croping my image.. I found solution here: stackoverflow.com/questions/12982404/… Commented Apr 11, 2014 at 10:12

1 Answer 1

1

you can use imageview like this

<ImageView android:id="@+id/imageView_clock" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scaleType="centerCrop" android:src="@drawable/ic_icon" /> 

and its depends on your image size from web

 android:scaleType="centerCrop" // use this 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.