10-24-2012 09:44 AM - edited 10-24-2012 09:44 AM
Hi,
I want an ActionItem to be added to actions on ActionBar when some event occur. I don't see any property to remove it initially and then add it on some event.
Presently I'm keeping that ActionItem disabled & I enable it on event capture. But this (disabled item) looks very ugly on ActionBar..! I just dont want it to be on bar when not needed. However, If I get a way to place it in Overflow when not needed, is fine.
I tried following snippet for this work around:
__________________________________________________
ActionItem{
title = "item"
actionBar.placement = ActionBarPlacement.InOverflow
}
__________________________________________________
Button{
text: "onBar"
onClicked:{
actionItem.ActionBar.placement = ActionBarPlacement.OnBar
}
}
__________________________________________________
onCreationCompletion{
actionItem.ActionBar.placement = ActionBarPlacement.InOverflow
}
__________________________________________________
But I think OS does not support it fully. I see the same item repeated multiple times onBar and in overflow both. Moreover my app gets crashed.
Has anybuddy any solution or work around?
Thanks in advance.
03-28-2013 10:00 AM - edited 03-28-2013 12:15 PM
hi Megha_9_dec, this seems to be a Cascades bug. As a workaround this issue until it is fixed, you have to refrain from changing the ActionItem.placment after the page is created.
Also, from a design point of view, it is not recommended that the application switches where the ActionItems are placed after the page is created. You can enable/disable ActionItems if desired, but changing the ActionItems placement will likely cause confusion to the user and affect the user experience.
Samar Abdelsayed - Application Development Consultant - BlackBerry
Did this answer your quetion? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker