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
Contributor
Posts: 15
Registered: ‎07-15-2013
My Device: Blackberry Z10
My Carrier: Verizon
Accepted Solution

Is it possible to have different text on the action menu than on the action bar?

I want to have text on the action menu such as "Start my meeting" and have a title on the tab of the action bar that just says "Meeting" since start my meeting is hard to fit. Is this possible?

 

Thanks once again.

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Is it possible to have different text on the action menu than on the action bar?

[ Edited ]

There is but it's not exactly pretty, you can hook into the ActionMenuVisualStateChanged signal and change the text on showing then hook into the signal again to replace on the way out.

 

[Edit] The reason I say it's not pretty is that with your example if any of the ActionItem is visible on the bar then the text will noticably change.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Is it possible to have different text on the action menu than on the action bar?

The code...

 

Page {
    actions: [
        ActionItem {
            id: aiFirst
            ActionBar.placement: ActionBarPlacement.OnBar
            title: qsTr("First")
        },
        DeleteActionItem {
            
        }
    ]

    onActionMenuVisualStateChanged: {
        if (actionMenuVisualState == ActionMenuVisualState.AnimatingToVisibleFull) {
            aiFirst.title = qsTr("First and still the best")
        } else if (actionMenuVisualState == ActionMenuVisualState.AnimatingToHidden) {
            aiFirst.title = qsTr("First")    	    
        }
    }

    [ ... ]

}

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Contributor
Posts: 15
Registered: ‎07-15-2013
My Device: Blackberry Z10
My Carrier: Verizon

Re: Is it possible to have different text on the action menu than on the action bar?

Thanks so much! It works like a charm. I only wish there was a way to do it before the animation as opposed to after the animation.