移行先サイト
スクリーン幅 | Ti.Platform.displayCaps.platformWidth |
スクリーン高さ | Ti.Platform.displayCaps.platformHeight |
Ti.API.info('Ti.Platform.displayCaps.platformWidth='+Ti.Platform.displayCaps.platformWidth); Ti.API.info('Ti.Platform.displayCaps.platformHeight='+Ti.Platform.displayCaps.platformHeight); //Ti.Platform.displayCaps.platformWidth=320 //Ti.Platform.displayCaps.platformHeight=480
起動時には向きがわからないので以下の方法で端末ディスプレイの高さを取得する。
var deviceHeight = (Ti.Platform.displayCaps.platformHeight>Ti.Platform.displayCaps.platformWidth)? Ti.Platform.displayCaps.platformHeight:Ti.Platform.displayCaps.platformWidth;