有没有办法知道该应用程序是否在以下设备上运行:Android 平板电脑、iPad 或智能手机(手持设备)?
我正在使用 Titanium Appcelerator SDK 5.3.0GA 进行经典开发。
谢谢
最佳答案
您可以区分平板电脑和手持设备
在 Controller 中:
Alloy.isTablet or Alloy.isHandheld.
TSS:
"Label[platform=ios formFactor=handheld]": {
backgroundColor: "#f00",
text: 'iPhone'
},
function to know if is Tablet, iPad, Smartphone?
http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_Styles_and_Themes
关于android - 功能来知道是平板电脑,iPad,智能手机?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37870374/