How to remove toolbar in rhomobile production build?

93 views Asked by At

I am trying to remove toolbar entirely in rhomobile 4.0.0 but @@toolbar = nil property is not working in rhomobile 4.0.0 production build.

1

There are 1 answers

3
pfmaggi On

Building a new project with RhoMobile v5.1.1 (the latest available at this moment) or with RhoMobile Suite v4.0.0 (that is nearly two years old but is the one included in the original question), the navigation bar disappears when you uncomment the @@toolbar = nil line in the application.rb in the /app/ folder of your project:

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

This is the original application, as scafolded by RhoMobile (with the navigation bar) running on an Android device:

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

And here the same application uncommenting the @@toolbar = nil line: same application uncommenting the <code>@@toolbar = nil</code> line