2014-12-06 27 views
0

我對鈦合金中的物體,可見性屬性的實際含義有疑問。鈦合金套件視圖的可見性

在應用程序的profile.js控制器文件中,檢查用戶是否已登錄(state = null),並根據此情況或者(a)「未登錄」文本標籤消息(id = not_logged_in_message)顯示或(b)配置文件數據可見。

現在,當用戶登錄時,文本標籤(或其內容)不會顯示出來,但似乎xml標籤標籤(標記爲黑色矩形)仍然會將所有內容壓低。

if (state === null) { 
    $.topBar.setTitle(L('Please login')); 
    $.profile.visible=false; 
    $.not_logged_in_message=true; 
} else { 
    $.topBar.setTitle(L('Profile')); 
    $.profile.visible=true; 
    $.not_logged_in_message=false; 
    get_profile(); 
} 

THX任何建議!

回答

0

在Appcelerator的論壇上檢查了這一點: http://developer.appcelerator.com/question/161936/vertical-layout-visible--false-but-controls-still-occupying-space

可見手段:其從視圖中隱藏,但不從結構中移除。 你可以嘗試從那裏的答案,如刪除標籤或改變寬度和高度的建議。

+0

thx Jeroen!你的鏈接是點亮的。刪除標籤工作非常好! – user24957 2014-12-10 09:48:02

+0

不客氣! – Jeroen 2014-12-10 10:08:47