Images from drawable-nodpi getting scale

by Wri » Fri, 22 Oct 2010 05:27:43 GMT


Sponsored Links
 I recently rebuilt my project to target 2.2 from 2.1.

In the old project, I did not specify a target SDK (the manifest did
not contain something like: <uses-sdk android:minSdkVersion="8" />).
This gave me an error in the console when running, but everything
worked fine so I didn't fool with it.

The new project now uses <uses-sdk android:minSdkVersion="8" /> in the
manifest.

But now my drawables from the /drawable-nodpi/ folder are loading with
scaling, making them much smaller and significantly changing the
desired visuals.

If I cut out the <uses-sdk android:minSdkVersion="8" /> tag from my
manifest, they load properly without scaling.

Even when loading my images like so:

                BitmapFactory.Options opts = new
BitmapFactory.Options();
                opts.inScaled = false;
                Bitmap bm = BitmapFactory.decodeResource(_resources,
resId, opts);

They are still scaled when I declare the minimum SDK in the manifest,
but not scaled if I remove that tag.

Why is this happening? How can I load them without scaling while still
declaring the minimum SDK?

--



Images from drawable-nodpi getting scale

by TreKing » Fri, 22 Oct 2010 23:44:20 GMT


 



Be careful here ... "target SDK" is NOT the same as "minSDK". Was that a
typo or are you not clear on this?



So you're app is designed to work ONLY on 2.2 (SDK 8) or is that what your
"target" (what you're testing on) is?



This I don't know - I haven't had to deal with all this screen support stuff
as the defaults work out fine for me for now, but I would double check you
really want min SDK to 8 and read over this:
 http://developer.android.com/guide/practices/screens_support.html 

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

--


Sponsored Links


Images from drawable-nodpi getting scale

by Stephen Jungels » Sat, 23 Oct 2010 00:20:19 GMT


 In addition to what was said above, if you study the
<supports-screens> directive carefully and set it properly in your
manifest, that will most likely clear things up.





>



Images from drawable-nodpi getting scale

by Kostya Vasilyev » Sat, 23 Oct 2010 01:44:45 GMT


 If you don't specify <supports-screens> or minSdk, then your app will 
run in compatibility mode, meaning that it's given an HVGA (240x320) 
"virtual screen", which is then scaled as a whole. So your images will 
be scaled.


If you specify minSdk >= 4, or <supports-screens>, then scaling should 
work as expected.


Except one case - if you're running on 1.5.

Since 1.5 didn't have support for multiple resolutions, it doesn't 
understand alternative resource qualifiers and might occasionally grab 
the wrong image. To prevent this, add "-v4" at the end of your qualified 
resource directory names, e.g. "drawable-hdpi-v4", "drawable-ldpi-v4". 
This makes those directories invisible to 1.5.


-- Kostya

22.10.2010 20:20, Stephen Jungels :
In addition to what was said above, if you study the <supports-screens> directive carefully and set it properly in your manifest, that will most likely clear things up.
In the old project, I did not specify a target SDK (the manifest did not contain something like:<uses-sdk android:minSdkVersion="8" />).
Be careful here ... "target SDK" is NOT the same as "minSDK". Was that a typo or are you not clear on this?
The new project now uses<uses-sdk android:minSdkVersion="8" /> in the manifest.
So you're app is designed to work ONLY on 2.2 (SDK 8) or is that what your "target" (what you're testing on) is?
Why is this happening? How can I load them without scaling while still declaring the minimum SDK?
This I don't know - I haven't had to deal with all this screen support stuff as the defaults work out fine for me for now, but I would double check you really want min SDK to 8 and read over this: http://developer.android.com/guide/practices/screens_support.html ------------------------------------------------------------------------------------------------- TreKing - Chicago transit tracking app for Android-powered devices --



Other Threads

1. need complied binary of android with bluez

i need complied binary of android with bluez
if any one has complied the image successfully , can i get that image
to install on adp

or  can i get the steps to compile bluez with android to create
images
which later can be installed on adp by fastboot method

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. How to add new MIME type?

Hi,

I have some question about MIME type.
I would like to add specific MIME type I defined without chainging
framework.

For example, some file manager app lists and shows files in SD.
File name is "TEST.japan" !!

The application I made picks up INTENT from file manager app and show
that file when user clicked on it!!

does anyone know how to do that?

Cheers,
 Taichi

-- 

3. MediaPlayerDemo_Audio.java

4. Creating Activity From User Clicking Overlay

5. Android Virtual Device (AVD) and accelerometers

6. Consequences Of Unlocking A Motorola Cliq

7. Tree structure