Ruby on rails 如何在移动生产构建中删除工具栏?

Ruby on rails 如何在移动生产构建中删除工具栏?,ruby-on-rails,rhomobile,rhodes,Ruby On Rails,Rhomobile,Rhodes,我试图在rhomobile 4.0.0中完全删除工具栏,但在rhomobile 4.0.0生产版本中,工具栏=nil属性不起作用。使用rhomobile v5.1.1(目前最新版本)或rhomobile Suite v4.0.0构建新项目(这已经将近两年了,但已包含在原始问题中),当您取消注释项目的/app/文件夹中应用程序.rb中的@@toolbar=nil行时,导航栏将消失: require 'rho/rhoapplication' class AppApplication < Rh

我试图在rhomobile 4.0.0中完全删除工具栏,但在rhomobile 4.0.0生产版本中,工具栏=nil属性不起作用。

使用rhomobile v5.1.1(目前最新版本)或rhomobile Suite v4.0.0构建新项目(这已经将近两年了,但已包含在原始问题中),当您取消注释项目的
/app/
文件夹中
应用程序.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
要求“rho/rho应用程序”
类AppApplication右,@tabs[0]是选项卡栏中最左边的选项卡
#Super必须在*settings@tabs之后调用*after*settings!
@制表符=零
#要删除默认工具栏,请取消注释下一行:
@@工具栏=零
超级的
#取消注释以将同步通知回调设置为/app/Settings/sync\u notify。
#Rho::RhoConnectClient.setObjectNotification(“/app/Settings/sync\u notify”)
Rho::RhoConnectClient.setNotification(“*”、“/app/Settings/sync_notify”、”)
结束
结束
这是运行在Android设备上的RhoMobile(带有导航栏)的原始应用程序:

在这里,同一个应用程序正在取消注释
@@toolbar=nil
行:

那么,您已经删除了项目中application.rb文件中的注释,现在执行了@@toolbar=nil行,但您仍然使用屏幕底部的导航栏?是的,我已经删除了,但我仍然可以看到导航栏。您是否尝试在构建项目之前清理它?我要求的是Rhomobile v4.0.0,而不是RhoMobile v5.1.1答案与旧版本上的测试相同。我已经用RhoMobile v4.0.0恢复了一个旧VM(大约有2年历史了)行为是一样的,取消对@toolbar=nil的注释会消除设备底部的导航栏。我建议您检查您的设置,尝试重新安装rhodes gem。我在RhoSimulator和Android上做了测试,行为是相同的正确行为。您测试的是哪个操作系统?我做了一些测试th RhoMobile v4.0.0和Qt v4.7.4以及所有功能均按预期运行。我使用了Visual Studio 2008。我使用RhoMobile v5.1.1、Qt v5.1.1和Visual Studio 2008进行了另一次测试,没有任何问题。请重新检查您的设置(Visual Studio版本、Qt库版本等)好吗?