I have a screen on which the user can read the article (with a large photo at the top.
General structure:
LinearLayout -> ScrollView -> LinearLayout -> ImageViews,TextViews...etc
ImageView has problems with a large image at the top (below the title of the article, but above it is the text:
<ImageView android:id="@+id/article_photo" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/super_light_gray" android:scaleType="centerCrop" android:contentDescription="@string/articlePhoto" android:cropToPadding="true" android:layout_marginBottom="10dp" android:padding="1dp"/>
The problem is that photos appear, but are cropped vertically A LOT , so that even vertically oriented photos appear very thin and wide. I suggested that "wrap_content" should make it the full height of the photo ... but I'm obviously mistaken :)
How can I make a photo complete (already working), but also complete?
I use UniversalImageLoader to load images:
if(lrgPhoto != null && !lrgPhoto.filepath.equals("")) { imageLoader.displayImage( "http://img.mysite.com/processes/resize_android.php?image=" + lrgPhoto.filepath + "&size=640&quality=90", imageView, imgDisplayOptions ); imageView.setVisibility(View.VISIBLE);
Edit:
If I changed "scaleType" to "fitXY", then the image will show the correct dimensions without cropping, but then this is not the full width. Is there a way that I can have both full size and uncircumcised weird?
Cropping seems to be because it uses the original image height for the height, but enlarges the image to full width ...
source share