I've tried to run my app on a Nexus-One-like emulator skin and a Galaxy-Tab-like. As far as I know, both devices are hdpi, but Nexus is considered large and Galaxy Tab is considered xlarge. I have two folders for my drawables: drawable-large-hdpi and drawable-xlarge-hdpi. However, Galaxy Ta开发者_如何学JAVAb takes resources from the drawable-large-hdpi folder. It does not make sense for me. Am I doing something wrong? How can I manage my resources to fit on both screens? Thanks.
Two things, you are probably wrong in saying Galaxy tab is xlarge, from my memory I had found it to be large screen, check this. Second, read up here to learn more about this. Trust me it can get really messy and hard to remember :)
A 7" screen can be either Large or XLarge according to http://d.android.com/guide/practices/screens_support.html For the Galaxy Tab, it appears to be considered Large.
The problem could also be that, Android 2.2 does not have the XLarge qualifier, so it fails into Large by default. That qualifier was introduced in Android 2.3. I do not think 2.3 has been rolled out to the Galaxy Tabs yet, so it's possible the resources may change with an updated version.
This is probably a little late, but better late than never I guess.
The 7 inch Galaxy Tab is considered "large". If AndEngine is not picking up your resources correctly from the "drawable-large-hdpi" folder, then it is likely to do with your AndroidManifest.xml. Check to make sure that you have a "supports-screens" tag, and the "large" attribute set to true. Example:
<supports-screens android:large="true".../>
You will probably need other attributes set as well (e.g. "normal") to support phones. As a fallback, also enable "anyDensity".
精彩评论