2016-04-03 56 views
3

我在LiveCode - 計算器中做了一個應用程序。我是通過這些(https://livecode.com/lessons/calculator/)指令來完成的,並且它已被縮放以適合iPhone。 我需要它來適應運行Android的不同手機(三星,GSmart,LG等)。 我經歷了這個網站的大部分,也是LiveCode論壇和幫助(http://lessons.livecode.com/m/4071),沒有任何關於Android手機,只有iOS的東西。 我也試過如何讓一個應用程序適合不同的手機

on preOpenStack set the fullscreenmode of me to "exactFit" end preOpenStack

,但我不知道它的工作(沒有保存它作爲獨立的應用程序,要做到這一點在前)。

謝謝你的回答。

回答

0

我有一部Android平板電腦和一部運行Android的廉價LG手機。在平板電腦上。我可以使用每種模式,但在手機上一個或多個不起作用。也許屏幕太小了。也許你遇到了同樣的問題。您可以嘗試不同的模式,例如letterbox,noBorder和showAll。

在過去,我有過的情況下,我不得不讓引擎設定the fullscreenMode之前繪製卡:

on openStack 
    send "initializeStack" to me in 0 millisecs 
    pass openStack 
end openStack 

on initializeStack 
    set the fullscreenMode of this stack to "exactFit" 
end initializeStack 

我不知道這是否仍與最新版本8.x的有用。

另一種解決方案是set the rect of the stack to the screenRect並添加一個腳本來調整每個對象的位置,例如,如果您有field 1,則腳本中應包含以下內容:

on initializeStack 
    set the rect of this stack to the screenRect 
    put the rect of this cd into myRect 
    add 4 to item 1 of myRect 
    add 4 to item 2 of myRect 
    subtract 4 from item 3 of myRect 
    subtract 4 from item 4 of myRect 
    set the rect of fld 1 to myRect 
end initializeStack 
相關問題