2015-07-06 42 views
0

我想在rhomobile 4.0.0中完全刪除工具欄,但@@toolbar = nil屬性在rhomobile 4.0.0生產版本中不起作用。如何刪除rhomobile生產版本中的工具欄?

+0

所以,你已經刪除了在項目中application.rb中文件,而現在 @@工具欄註釋=零 線執行,但你仍然在屏幕底部的導航欄? – pfmaggi

+0

是的,我已經刪除,但我仍然能夠看到導航欄。 – Shubham

+0

您是否在構建之前嘗試清理該項目? – pfmaggi

回答

0

使用RhoMobile v5.1.1(目前最新版本)或者使用RhoMobile Suite v4.0.0(即將近兩年之久,但是原始問題中包含的版本)構建新項目,導航欄會消失當您取消註釋在application.rb@@toolbar = nil線項目的/app/文件夾:

require 'rho/rhoapplication' 

class AppApplication < Rho::RhoApplication 
    def initialize 
    # Tab items are loaded left->right, @tabs[0] is leftmost tab in the tab- bar 
    # Super must be called *after* settings @tabs! 
    @tabs = nil 
    #To remove default toolbar uncomment next line: 
    @@toolbar = nil 
    super 

    # Uncomment to set sync notification callback to /app/Settings/sync_notify. 
    # Rho::RhoConnectClient.setObjectNotification("/app/Settings/sync_notify") 
    Rho::RhoConnectClient.setNotification('*', "/app/Settings/sync_notify", '') 

    end 
end 

這是原來的應用程序,如Rhomobile的scafolded(帶導航欄)在Android設備上運行:

This is the original application, as scafolded by RhoMobile (with the navigation bar)

在這裏,同一個應用程序取消註釋@@toolbar = nil行: same application uncommenting the <code>@@toolbar = nil</code> line

+0

我要求Rhomobile v4.0.0不適用於RhoMobile v5.1.1 – Shubham

+0

答案與舊版本相同。我已經使用RhoMobile v4.0.0(大約2年前)恢復了一臺舊VM,並且行爲相同,取消註釋@@ toolbar = nil消除了設備底部的導航欄。我建議你檢查你的設置,試圖重新安裝羅德寶石。我已經在RhoSimulator和Android上完成了我的測試,並且行爲是一樣的。你在測試哪個操作系統? – pfmaggi

+0

我使用Win 32. – Shubham

相關問題