Are you saying that the "X" gets scaled up to the full size of the
ImageView as though the transparent "border" were not there? I have an
ImageView that displays photos in their "native" pixel dimensions up
to a max size by doing this:

            <ImageView android:id="@+id/photo"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:scaleType="fitCenter"
                        android:maxWidth="214dip"
                        android:maxHeight="214dip"
                        android:adjustViewBounds="true"
                />

This does *not* scale up images that are less than the max dimensions.
But I might be aiming for something quite different from your case.

On Feb 11, 12:22 am, Kookamonga <[email protected]> wrote:
> I have an ImageView defined like so:
>
>                 <ImageView android:id="@+id/im_delete"
>                                    android:layout_width="fill_parent"
>                                    android:layout_height="40dp"
>                                    android:background="@null"
>                                    android:src="@drawable/delete"
>                                    android:scaleType="center"
>                                    android:layout_weight="1"/>
>
> The "delete" drawable is a 60x60 png with a roughly 28x28 white X in
> its center; the rest of the png is transparent. When this view
> appears, the white X appears scaled (larger than original). This looks
> ugly. Is there any way to prevent this scaling? What is causing it?
>
> I have tried to follow Mark's suggestion here (drawable-nodpi folder),
> but unfortunately, it didn't work:
>
> http://groups.google.com/group/android-developers/browse_thread/threa...
>
> I have tried android:background="@null" and android:scaleType="center"
> and android:src, according to this:
>
> http://stackoverflow.com/questions/2406172/android-how-to-prevent-ima...
>
> Still no dice. I'm not sure what I'm missing here.

-- 
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