Hi Dianne,

I wish I could share with you my source so you can see why its
necessary.  I've already tried various methods before settling on the
solution I have now.  My app now displays its custom graphics on the
G1, Droid, and Dell Streak's specs on the emulator.

My app is a utility that uses rendered graphics to make the app look
nice.   I have imagery that is 320x480 for use on mdpi devices, and
imagery at 480x720 for use on hdpi and large devices.  My goal was to
create graphics that would not require resizing for the majority of
high res devices.  The Dell Streak being a high res device should have
used the 480x720 imagery, but instead used the images in the 'drawable-
mdpi'.  It was only after I created a 'drawable-large' folder with a
duplicate set of 480x720 images that the Dell Streak would finally use
them.  I could have worked it out so that the Streak would use the
graphics in the mdpi folder and just scaled them up to fill the
screen, but that would have been a bad solution for people capable of
displaying high resolutions.

I also tried creating a 'drawable-hdpi-large' folder, but it wouldn't
work for some reason.

I hope this makes sense and helps explain the issue I was having.  I
found that the resource aliasing only works from a 'drawable' folder.
I've copied all my high res images into that folder and I have
references in my 'drawable-hdpi' and 'drawable-large' folder.

I believe it is a shortcoming of the way Android is designed where I
can't run the alias's from anything other than the 'drawable' folder.

I understand the difference between screen sizes and dpi', I'm just
trying to find a simple way to make a device utilize graphics that its
capable of supporting.

Thanks,
Stephen



On Jul 2, 5:33 pm, Dianne Hackborn <[email protected]> wrote:
> Why do you want to do this?  The Streak's screen is really what it reports
> -- mdpi density, but more space.  If you use hdpi graphics, then your
> graphics will appear incorrectly large on the screen.  You should layout
> your UI to use the extra space, not blow it up larger.
>
> The main time I can think where it would be okay to just use larger graphics
> is a game, where having everything blow up bigger is not so noticeable.  In
> that case, you should maybe just go down the path of picking the graphics
> you want to use explicitly based on the raw space you have to work with.
>  Before going down that road, though, you should probably stop and consider
> what it really means to be manually adjusting for whatever the screen is.
>
>
>
>
>
> On Fri, Jul 2, 2010 at 5:15 PM, Stephen Lebed <[email protected]> wrote:
> > I'm hoping there is an answer to my problem.  I've created two sets of
> > graphics for my app.  A set for medium res phones and a set for high
> > res phones.  I've placed them into their drawable-mdpi and drawable-
> > hdpi folders.
>
> > I've now learned that the Dell Streak identifies itself as a large-
> > mdpi display.  I've created a drawable-large folder and placed the
> > high res images into it.  Its so far, everything is working in the
> > emulator.
>
> > My problem is I would like to create a single set of high res graphics
> > and have it availalbe to both drawable-hdpi and drawable-large.  I've
> > tried using the example in the docs
>
> >http://developer.android.com/guide/topics/resources/providing-resourc...
>
> > but it doesn't seem to work.  I wanted to use drawable-hdpi to store a
> > single copy of all the high res images, and store the xml aliases in
> > drawable-large.  It compiles without error, but when my app tries to
> > read the drawable, it throws an error, Null Pointer Exception.
>
> > Does the alias xml file only work with images in drawable, or can they
> > be in a drawable-hdpi folder?  When I try to pull the file from
> > drawable-hdpi it causes the error.
>
> > Any help would be appreciated.
>
> > Stephen
>
> > --
> > 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]<android-developers%2Bunsubs 
> > [email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  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 [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