For iOS it's super easy Ti.Platform.osname It's either going to be iphone, ipad or android.
I know how to do this with iOS but android I am struggling. Say I want a different layout for an android tablet versus an android phone...how would I do that?
2 Answers
Here is the code that I use in my applications://considering tablet to have one dimension over 900px - this is imperfect, so you should feel free to decide
//yourself what you consider a tablet form factor for android
var isTablet = osname === 'ipad' ||
(osname === 'android' && (width > 899 || height > 899));
var Window;
if (isTablet) {
// Tablet specific code
}
else {
// Phone specific code
}
also look at the sample applications in the TiStudio Dashboard, they have sample code to address this issue
Your Answer
Think you can help? Login to answer this question!