Re: [android-developers] How does Android build background?

2009-11-11 Thread Romain Guy
It doesn't "replicate it," it simply stretches it at runtime. You can
simply load a BitmapDrawable from your resource and set the gravity so
that it doesn't stretch.

On Wed, Nov 11, 2009 at 5:11 AM, Alain  wrote:
> In my tabhost, I define a setBackgroundDrawable with a png resource
> that's 2px wide and 50px high. Android fills the background with this
> resource.
>
> The question I have:
>
> Does Android replicate the resource to fill the width of the screen or
> does it stretch it? The png is not 9-patch.
>
> Thanks
> Amiz
>
> --
> 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
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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


[android-developers] How does Android build background?

2009-11-11 Thread Alain
In my tabhost, I define a setBackgroundDrawable with a png resource
that's 2px wide and 50px high. Android fills the background with this
resource.

The question I have:

Does Android replicate the resource to fill the width of the screen or
does it stretch it? The png is not 9-patch.

Thanks
Amiz

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