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
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

bottom menu bar

hi there

 

http://s22.postimg.org/82fj75uep/IMG_00000017.png

 

can someone tell me whats the menu bar below  search, compose, more..

how can i add it to my page... the page will also have back button next to this bar...

Developer
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: bottom menu bar

import bb.cascades 1.2

Page {
    Container 
    {
        contextActions: [
            ActionSet {
                title: "Email"
                subtitle: "From: John Doe"
                ActionItem {title: "Reply"}
                ActionItem {title: "Forward"}
            },
            ActionSet {
                title: "Sender"
                ActionItem {title: "Call"}
                ActionItem {title: "Send SMS"}
            }
        ]
	    }
    }

 

 

i did this, nthg shows up below button bar

Developer
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: bottom menu bar

i thini i got an error

ERROR: Context: Object name=" "ActionItem" " [objectId= 147 ] not unrealized
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: bottom menu bar

[ Edited ]

You probably don't need to worry about this as some cascades objects don't clean up after themselves very well.

 

However make sure you are parenting your QObject or CustomControl derived classes properly...

 

http://developer.blackberry.com/native/documentation/cascades/dev/qt_fundamentals/#objectownership


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

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: bottom menu bar

import bb.cascades 1.2

Page {
    actions: [
        ActionItem {
            id: action1
            title: "myActionTitle"
            ActionBar.placement: ActionBarPlacement.OnBar
            onTriggered: {
                
            }
        }
    ]
}

 

 

got it this way, let me work and see it.

 

 

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

Re: bottom menu bar

In this case make sure you are destroying the page when it's popped.


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

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: bottom menu bar

[ Edited ]

Depending on your code obviously but something like this is usually sufficient...

 

NavigationPane {
    id: navigationPane

    onPopTransitionEnded: {
        page.destroy();      // Destroy the Page
    }

    [ ... ]

}

 [Edit] Note that this is only the most common way, you are free to keep or destroy pages as you wish, the sophistication of managing memory obviously as complex as is needed.


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

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: bottom menu bar

if i do many actionitems, on the right side.. a button more shows up

 

how can i on the first actionitem for example..open up a menu similar to the more bar on the right side?

 

 

Developer
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: bottom menu bar

is destroying pages important?

 

i have done navigation pane...

 

i go to page 1, then page 2.. then page 3..

navigation pane still alive

 

 

    onPopTransitionEnded: {
        page.destroy();      // Destroy the Page
    }

 

I cannot destroy the navigation pane, i cannot do that.as he can go from page3 to page 1...

 

but on page 3 i am displaying the back button below..plus actionitems.

 

Developer
Posts: 791
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: bottom menu bar

i have navigation pane on page 1..
move to page 2, move to page 3..
on page 3 i need back  button..which automatically shows up..

and aciton menuitem

 

import bb.cascades 1.2

Page {
    Container {
        background: style.bgColor   
        Container {
            preferredWidth: Infinity
            background: style.black
            TopBar 
            {
                id: bar
                layoutProperties: StackLayoutProperties {
                    spaceQuota: -1
                }
            }
            layoutProperties: StackLayoutProperties {
                spaceQuota: -1
            }
        }
    }
    actions: [
        ActionItem {
            id: action1
            title: "Batata"
            ActionBar.placement: ActionBarPlacement.OnBar
            onTriggered: {
                
            }
        },
        ActionItem {
            id: action2
            title: "Taboule"
            ActionBar.placement: ActionBarPlacement.OnBar
            onTriggered: {
            
            }
        },
        ActionItem {
            id: action3
            title: "Batikh"
            ActionBar.placement: ActionBarPlacement.OnBar
            onTriggered: {
            
            }
        }
        ,
        ActionItem {
            id: action4
            title: "Hommos"
            ActionBar.placement: ActionBarPlacement.OnBar
            onTriggered: {
            
            }
        }
        ,
        ActionItem {
            id: action5
            title: "Banadoura"
            ActionBar.placement: ActionBarPlacement.OnBar
            onTriggered: {
            
            }
        }
    ]
}

 

 

I have 2 questions, how ontriggered i can show something very similar to more button click.. menu on right or left side.

 

and how can i open new page after click of a menu

 

another question i get this on click of more actionitem Context: Failed to find target node with id  0