Actually, I figured it out. The way I did it in the end actually DID seem to be a case for a 9-Patch, and indeed somewhat of an abuse of the concept. Specifically, I took the background corner image, made it a 9-Patch, and set it so that the topmost row and leftmost column are stretchable, with the entire image marked as drawable (all black pixels along the right and bottom edges). That seemed to do the trick.
I'll also note that forgetting to mark the entire image as drawable doesn't work at all, as that makes it draw the entire view in the stretchable area. But, thanks for your help anyway! On May 29, 8:13 pm, "[email protected]" <[email protected]> wrote: > Cant try it out myself as im about to run out the door for a meeting, > but try setting the background color, then overlaying the image ontop > of that at a certain position(use % based if you can so portrait/ > landscape is just one code). Ill have a play when i get back myself, > though this meeting will probably take a few hours. > > - Marak > > On May 24, 5:55 am, CaptainSpam <[email protected]> wrote: > > > I'm not sure if this is exactly a beginner question or not, but I'll > > ask here anyway. > > > What I'm trying to add to my app is a simple background for the common > > windows. That part is easy enough either through themes or defining a > > background attribute to the toplevel layouts, but what I'm > > specifically trying for is a background with a drawing in the lower- > > right of the window. > > > Now, this is also easy to implement in a sort of brute-force method. > > That is, make a background the size of the screen that is mostly white > > and leave it at that. But, that seems sort of a waste of storage > > space (ignoring the fact that PNG compresses big empty spaces well) > > and would not scale well if used on a device that doesn't have the > > 320x480 screen of the G1. Plus, it requires two backgrounds for the > > G1 regardless, one for portrait and one for landscape. And I can't > > easily define it in a theme without checking the orientation on each > > layout and reassigning the theme then based on it (else it scales to > > the new orientation). > > > So my question is, how hard would it be to make a background I can > > attach to a theme with a single image in the corner that does not > > scale with the rest of the single-color background? Would this be a > > job for a NinePatch (albeit not the job it was meant for)? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" 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-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

