Skip to content

Instantly share code, notes, and snippets.

@FokkeZB
Created August 22, 2013 09:54
Show Gist options
  • Save FokkeZB/6305325 to your computer and use it in GitHub Desktop.
Save FokkeZB/6305325 to your computer and use it in GitHub Desktop.
How to know if your Android device is LONG or NOTLONG?
http://developer.android.com/guide/topics/resources/providing-resources.html#ScreenAspectQualifier
if ((Ti.Platform.displayCaps.platformWidth / Ti.Platform.displayCaps.platformHeight) < (((Ti.Gesture.orientation === Ti.UI.LANDSCAPE_LEFT)) ? (320 / 240) : (240 / 320)))) {
Ti.API.info('I am LONG');
} else {
Ti.API.info('I am NOTLONG');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment