If your image is a texture, use 9-patch images. This is the
recommended way to manage your images on Android. There's a slight
learning curve, but once you get a hold of it, it will be a breeze.

Thanks and Regards,
Kumar Bibek

On Apr 5, 1:30 am, HippoMan <[email protected]> wrote:
> Is there a way to tell Android to do the following when setting the
> background image for a TextView?
>
> 1. Scale the image so that it's just large enough to fill the the
> entire viewing area without any black borders, while still maintaining
> its aspect ratio. This might require clipping once the image is
> actually displayed, but that's OK (read on).
>
> 2. Then, center the image in the viewing area, both horizontally and
> vertically.
>
> 3. Finally, clip the image to the size of the viewing area, without
> any further rescaling.
>
> I'm guessing that this kind of image processing is not automatically
> done via any of Android's facilities, and that I'll have to do it
> myself. If this is a correct assumption, could someone point me to
> some documentation or some examples which could explain how I can
> accomplish this? I'm guessing that I'll have to subclass my TextView
> and implement my own onDraw() method, but could someone confirm or
> deny that assumption?
>
> Thanks in advance.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to