On Wed, Sep 29, 2010 at 8:10 PM, Brad Gies <[email protected]> wrote:
> The second image is for the detail view and it basically should fill the
> entire width of the screen (roughly, it's ok if it doesn't use the entire
> width as long as none of it is chopped off). The size I use for my G1 is
> 468x60.

Saying you want something to "fill the entire width of the screen" is
fine. Saying you want a bitmap to "fill the entire width of the
screen" is likely to be a source of trouble. That's mostly because
"the entire width of the screen" has so many possible values:

-- 240
-- 320
-- 400
-- 432
-- 480
-- 800
-- 854

And that's just with the six smartphone sizes for which we have
built-in emulator configurations with Android 2.2. Add in some XGA
tablets (768 and 1024) and 1080p televisions (1080 and 1920) and
whatever else comes about in the next few months, and things will get
that much more complicated.

Since we don't really know what the graphic is or what you mean by
"it's ok if it doesn't use the entire
width as long as none of it is chopped off", it's tough to give precise advice.

Here are a few ways of doing something that will "fill the entire
width of the screen" without a preposterous number of images:

-- Use a nine-patch PNG, if the image can reasonably be stretched

-- Use a ShapeDrawable, if the image is a gradient or something that
can be stretched

-- Use a smaller image that blends into a background defined as a
solid color or a ShapeDrawable or a nine-patch PNG, so the smaller
image can be done with just three flavors for the different screen
densities so it is a reasonable size for all

Or, come up with another GUI design that does not require an image to
"fill the entire width of the screen".

There are probably other solutions as well, but these are the ones
that pop to mind right away.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 2.2 Programming Books: http://commonsware.com/books

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