我试图在RhomMobile4.0.0中完全删除工具栏,但@@toolbar = nil属性在RhomMobile4.0.0生产版本中不起作用。
发布于 2015-07-29 18:43:25
使用RhoMobile v5.1.1 (目前可用的最新版本)或RhoMobile Suitev4.0.0(已有近两年历史,但已包含在原始问题中)构建新项目时,当您取消注释项目的/app/文件夹中application.rb中的@@toolbar = nil行时,导航栏将消失:
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 (带有导航栏)复制:

在这里,相同的应用程序不注释@@toolbar = nil行:

https://stackoverflow.com/questions/31239577
复制相似问题