30.03.2011 20:40, Jake Colman пишет:
Actually, I am pretty sure that it is a 9-patch drawable, since the name
widget_frame.9.png.

Good.

Here is a(nother) dumb question: what app can I use to do this editing.
I didn't see anything in Gimp (using Ubuntu) that would allow me to set
or modify any margins.  Nor did I see anything about transparency.

Anything really - Photoshop, Gimp...

There is no such thing as margins in a PNG file, understood as some numeric value you can enter somewhere (at least not for Android).

A raster image has certain size, so many pixels across and so many pixels down. If it has transparent areas on the sides/top/bottom, then those would show up as margins when this image is used in an application.

What you need to do, is edit the file and make the transparent areas smaller, and/or the non-transparent area larger.

For a nine-patch drawable, you also need to leave one extra row / column on pixels on each of four sides, and draw black pixels that tell Android how to resize it. Without this, it's not really a nine-patch. You can do this in the same image editing program, or use Draw9Patch from the SDK:

http://developer.android.com/guide/developing/tools/draw9patch.html

Looking again at Widget Design Guidelines page I see that they posted
size-specific .psd files.  If that's the case, it means that it is NOT
where I got my widget_frame 9-patch.

The standard widget frames are in Photoshop format, not nine-patches. They are not very useful anyway, as they only fit well on an HVGA screen (320 by 480).

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Reply via email to