Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
sgallego84
Posts: 89
Registered: ‎10-18-2012
My Device: BB Z10
Accepted Solution

Hide action bar

Is there any way to hide the action bar and show it again when needed programatically??

I have seen that the image gallery in the camera application hides the action bar when you tap the screen and show it again with a new tap.

 

Best regards!

Please use plain text.
New Contributor
hervebags
Posts: 6
Registered: ‎12-05-2012
My Device: BB10 Dev Alpha

Re: Hide action bar

Here is one suggestion:

 

Give id's to your actions.

Write a slot that will be listening to the Signals you want it to listen to.

 

In the slot, you can hide the actions; that will also hide the action bar.

You can access the properrties of actions by using their id's.

 

I hope it helps :smileyhappy:

 

Please use plain text.
Developer
sgallego84
Posts: 89
Registered: ‎10-18-2012
My Device: BB Z10

Re: Hide action bar

Hi hervebags,

thanks for your suggestion. I think it is a good approach.

The problem is that I have a TabbedPane as the root of my QML.  Although I have no actions, the action bar is shown...

 

Any suugestions?

 

 

Please use plain text.
New Contributor
hervebags
Posts: 6
Registered: ‎12-05-2012
My Device: BB10 Dev Alpha

Re: Hide action bar

You can do this:

import bb.cascades 1.0
   
TabbedPane {
    id: tabbedPane
    showTabsOnActionBar: true
      
    Tab {
        title: "Tab 1"
    } // end of first Tab
       
    Tab {
        title: "Tab 2"
          
        content: Page {
            Button {
                onClicked: {
                    tabbedPane.showTabsOnActionBar = false
                }
            }
        }
    } // end of second Tab
}// end of TabbedPane

 But, you will still have a small icon on the left corner :smileysad:

 

Good luck finding the solution.

Please let me me when you solve this problem :smileyhappy:

 

Cheers,

 

Herve

Please use plain text.
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10

Re: Hide action bar

[ Edited ]

I belive you're referring to the Context Actions menu, which can be hidden by the Context Menu Handler

 

contextMenuHandler: ContextMenuHandler {
          id: myHandler
          onVisualStateChanged: {
              if (ContextMenuVisualState.VisibleCompact == myHandler.visualState) {
                    console.log("ContextMenu Visible"); 
                    console.log("Keyboard Hidden by Context Menu Compact");
                   } else if (ContextMenuVisualState.Hidden == myHandler.visualState) {
                       console.log("ContextMenu Hidden");
                      }
                    }
                   }
contextActions: [
           ActionSet {
                 actions: [ 
			//some context actions here
		]
}
]

 

 

 

Please use plain text.
Developer
citrinetiger
Posts: 55
Registered: ‎12-04-2012
My Device: Q10

Re: Hide action bar

 

 

say your main nav id is "mainPage"

put this within:

 

Page {

actionBarVisibility: ChromeVisibility.Hidden

}

 

then say you want it to be present when page "page2" opens. in page2 coding do something like this:

Page {

onCreationCompleted: {

mainPage.actionBarVisibility = ChromeVisibility.Overlay;

}

}

Please use plain text.
Developer
sgallego84
Posts: 89
Registered: ‎10-18-2012
My Device: BB Z10

Re: Hide action bar

Great!! It was just what I looking for!

Please use plain text.