Well, I guess, if it's a background or a texture image that you want
to scale, it's advisable to go the 9-patch way.

Else, if it is a normal picture, if stretched, it would obviously not
look good.

By the way, to stretch an image, you can try FIT_XY. But I don't know
if it works all the time.

Thanks and Regards,
Kumar Bibek

On Mar 28, 8:04 pm, Marco Alexander Schmitz
<marco.alexander.schm...@googlemail.com> wrote:
> hi,
>
> I've got a picture 300x98.
>
> I want to use an ImageView with width="fill_parent" in order to let
> Android zoom it to 320x105 (portrait) or 480x157 (landscape).
>
> I tried every scaleType and adjustViewBounds combination, but didnt
> get it right :(
>
> documentation doesnt help me neither:
>
> CENTER
> Center the image in the view, but perform no scaling.
>
> CENTER_CROP
> Scale the image uniformly (maintain the image's aspect ratio) so that
> both dimensions (width and height) of the image will be equal to or
> larger than the corresponding dimension of the view (minus padding).
>
> CENTER_INSIDE
> Scale the image uniformly (maintain the image's aspect ratio) so that
> both dimensions (width and height) of the image will be equal to or
> less than the corresponding dimension of the view (minus padding).
>
> FIT_CENTER
> Scale the image using CENTER.
>
> FIT_END
> Scale the image using END.
>
> FIT_START
> Scale the image using START.
>
> FIT_XY
> Scale the image using FILL.
>
> MATRIX
> Scale using the image matrix when drawing.
>
> who can help?
>
> greetings,
> marco
>
> btw: I only want to use XML for this...

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to