Bitmap in ImageView is cropped off the screen

Posted by Computerish on Stack Overflow See other posts from Stack Overflow or by Computerish
Published on 2010-05-14T13:28:43Z Indexed on 2010/05/14 13:34 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I'm working on an Android application that needs to download an image and display it inside an image view. The Bitmap is passed to the main java file and added to the image view like this:

comic = (ImageView) findViewById(R.id.comic);
comic.setImageBitmap(c.getImageBitmap());

This works, except that the left side of the image disappears off the screen. The ImageView is in a ScrollView and the scroll view maintains the correct size. This means that there is black space to the right in the ScrollView and the image is cut off to the left.

The XML for the ImageView is this:

<ScrollView android:layout_width="fill_parent"

android:layout_height="fill_parent">

Any idea why my image is being cut off?

Thanks!

© Stack Overflow or respective owner

Related posts about android

Related posts about java