开发者

How to get the Android developer classes (packages) in my AS3 project

I'm a 20 year old Android developer, and i'm having some trouble publishing my application. The thing is that I want my application to work on every device screen. To do so I figured out I need to use the DIP class (DPI independent pixels) of the android packages.

The problem is I can't find them anywhere. I have looked for weeks ne开发者_JAVA百科w and it's driving me absolutely nuts. The one who can help me solve this problem I will pay good.


You just need to test for pixel density: Ie. Something like this

if(Capabilities.screenDPI <= 160){
// do this
}
else if (Capabilities.screenDPI > 160 && Capabilities.screenDPI <= 240){
// do something else
}
else{
// do this for retina screens
}

You could make the screenDPI a constant, which may help a tiny little bit with performance as you would only need to check once.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜