On Tue, Jun 21, 2011 at 4:47 AM, Jake Colman <[email protected]> wrote:
>>>>>> "NE" == Nikolay Elenkov <[email protected]> writes:
>
>   NE> On Mon, Jun 20, 2011 at 11:06 PM, Jake Colman <[email protected]> wrote:
>   >>
>   >> I realize that this is not a programming question but I'm hoping
>   >> someone here can help with a quick solution.
>   >>
>   >> I have a 9-patch file that I use as my widget background.  I did
>   >> not create it, I found it on the web.  I am using the image as
>   >> both a 1x1 and 2x1 background depending on the widget size.  My
>   >> problem is that the background does not stretch to fill the full
>   >> size of the 1x1 or 2x1 cell.
>
>   NE> I seems the outer part is transparent, that is why it doesn't
>   NE> fill your full widget size. It's a trick to make widgets look
>   NE> smaller than the standard cell size. You need to cut out the
>   NE> transparent bits to make it work.
>
>   NE> And no, no one will do your work for you.
>
> I tried a few things but could not figure our how, after removing the
> transparent outer part, to resize the inner part or crop the image.
> Instead, I did a 'zealous crop' with the transparency layer intact and
> that shrunk the outer section quite nicely.
>

Seems there's been a lot progress while I was sleeping :) Glad it
you worked it out. If you just crop it, that will remove the 9-patch lines
(the thins black lines at the edges), so it becomes a regular PNG
image that doesn't scale automatically. In that case, you need
to add those back with draw9patch (or the GIMP). Zealous crop
doesn't touch them, so it's still a 9-patch image after you apply
it.

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