Hi.

My app downloads some images over the net, and in this case they are
185 * 185, though that's probably irrelevant. I'm creating a layout
where I specify the size of the frame, in this case 150dip square, and
I want the image to fit the frame, regardless of whether the frame is
bigger or smaller than the bitmap size. I've tried a number of
options, and various flavors of android:scaleType, but I just cannot
get this to work.

Strangely in the above case, even though the xml frame is smaller than
the image I downloaded, there is always a border between the frame and
the rendered image. Here's the xml:

<LinearLayout
    android:orientation="vertical"
    android:layout_width="150dip"
    android:layout_height="150dip"
    android:gravity="center"
    android:layout_gravity="center"
    >

<ImageView android:id="@+id/myImage"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center"
        android:scrollbars="none"
        android:scaleType="fitCenter"
        />

</LinearLayout>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to