1 Reply Latest reply on Jun 14, 2013 4:45 AM by Kutir Mobility

    native tabbar

      Hi,

       

      I am trying to use the native tabbar, using below code in application.rb:

       

      Rho::NativeTabbar.create( :tabs => tabbar, place_tabs_bottom =>true)

       

      First issue is "place_tabs_bottom =>true" is not working. My tabbar is displayed on the top. Next thing is if I have 10 models and first model is a login page. I don't want my tabbar to be displayed on the login page and one of the other page. How can i do that?

       

      Is there anyway to do that through application.rb.

       

      Thanks.

        • Re: native tabbar
          Kutir Mobility

          What platform are you running your application on? According to the documentation, place_tabs_bottom only works on android.

           

          As for how to display or hide the tabbar depending on the model, one way would be to create a module to hold the common tabbar creation code, include it in your controllers and use the before filter to show or hide the tabbar as required. It could look something like this:

           

          module TabbarHelper
               def show_tabbar
               ...
               end
          
               def hide_tabbar
               ...
               end
          
          end
          

           

          class Model1Controller < Rho::RhoController
          include TabbarHelper
          
               before do |params,request|
                    show_tabbar
               end
          end
          

           

          class Model2Controller < Rho::RhoController
          include TabbarHelper
          
               before do |params,request|
                    hide_tabbar
               end
          end
          

           

           

          Thanks,

          Javier

          Kutir Mobility