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
Trusted Contributor
harsha973
Posts: 134
Registered: ‎05-31-2010
My Device: 8300
My Carrier: vodqafone
Accepted Solution

ActionItem shown twice

[ Edited ]

Hi Guys,

 

    I am getting a weird issue. When adding an Action Item to the Action Bar and if I use ActionBar.placement:smileytongue:roperty, Action item is shown twice.

 

Please,Refer the image below

 

  Action Bar error

 

 Code snippet i used :

 

 actions:ActionItem {
                title: "Show Next Page"
                ActionBar.placement: ActionBarPlacement.OnBar
            }

 

And if i remove ActionBar.placement every thing is working fine.

 

Could you please suggest me what might be the posssible solution?

 

Update:

Also found,This problem is when adding 

 

qml->setContextProperty("cppObject", this);

 in my cpp file.

 

Thanks & Regards,

Sha.

Please use plain text.
Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: ActionItem shown twice

Hi,

 

Register the properties before creating the root object as a workaround. This thread has more info:

http://supportforums.blackberry.com/t5/Cascades-Development/Duplicate-actionbar-buttons/m-p/2157969#...


Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
hemant_sain
Posts: 179
Registered: ‎12-09-2011
My Device: 9360, BB10
My Carrier: Aircel

Re: ActionItem shown twice

[ Edited ]

in onCreationCompleted:{} first remove all the action and then again add the particular actions whatever you want to show.

Please use plain text.