Anyone?  Still horribly stuck and confused...

On Aug 7, 2:06 pm, Greg <[email protected]> wrote:
> I am having an issue understanding how to get Bitmaps from resources
> in density specific directories to scale properly when drawing them to
> a Surface View.  If I have a resource in folder "drawable" I expect it
> to be scaled up when run on hdpi screens and scaled down on ldpi
> screens and left as is on mdpi or 1.5 screens.  Likewise I expect
> anything found in hdpi when run on an hdpi screen to remain unscaled.
>
> However, there is some combination of settings that I am not getting
> right to do this seemingly simple thing.  I am not running
> compatibility mode so my manifest supports all screen sizes with
> anydensity=true.  I do not understand the BitmapFactory.Options fields
> of inScaled, inTargetDensity, and inDensity that I am thinking have to
> be set appropriately and slightly different for each resource decoded
> depending on which directory they were found in and what screen they
> are currently run on.
>
> All I have been able to find is that if either inTargetDensity and
> inDensity are 0, no scaling occurs, but if not, scaling occurs such
> that inDensity matches inTargetDensity.  Is this correct?  I have no
> idea what valid settings are for these fields from the documentation
> other than ints.  What are the integer values for LDPI, MDPI, and
> HDPI?  And how do I determine the density of a resource in order to
> set this before I decode it?  Am I way off base in my approach for
> drawing bitmaps from various resource directories on various screen
> sizes?
>
> Any help would be much appreciated!
> Thanks,
> -Greg

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