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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 89
Registered: ‎10-18-2012
My Device: BB Z10
My Carrier: -
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!

New Contributor
Posts: 6
Registered: ‎12-05-2012
My Device: BB10 Dev Alpha
My Carrier: Vodacom

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 Smiley Happy

 

Developer
Posts: 89
Registered: ‎10-18-2012
My Device: BB Z10
My Carrier: -

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?

 

 

New Contributor
Posts: 6
Registered: ‎12-05-2012
My Device: BB10 Dev Alpha
My Carrier: Vodacom

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 Smiley Sad

 

Good luck finding the solution.

Please let me me when you solve this problem Smiley Happy

 

Cheers,

 

Herve

Highlighted
Developer
Posts: 828
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Rogers

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
		]
}
]

 

 

 

Developer
Posts: 55
Registered: ‎12-04-2012
My Device: Q10
My Carrier: Verizon

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;

}

}

Developer
Posts: 89
Registered: ‎10-18-2012
My Device: BB Z10
My Carrier: -

Re: Hide action bar

Great!! It was just what I looking for!