lundi 17 décembre 2018

Codename one - checkbox option in overflow menu

I have a form with a basic overflow menu, that is supposed to offer options of manipulating a list of items of that form. One part is sorting the list by various means (which works well), the other part is providing a filtering of the list. E.g. having a simple shopping list of items that can be checked and I want the filter to show only "open" items, yet unchecked to focus on.

Can I add a previously assembled component to the overflow menu? Its just a dialog spawning in that location, so it should be able to house any component for that matter. However, the options "add(Material)CommandToOverflowMenu" only allow to add commands directly or a string, icon, listener combination.

If a custom component is not possible, I could still use the icon to show an empty checkbox first, and then update to an checked checkbox icon, once pressed. However, how to manipulate an existing overflow item, after it was added? I dont even see a way to remove previously added overflow items, as the "getOverflowCommands" returns an Iterable, which is not supposed to be used for manipulation of the list.

Is there a way to do this, I do I have to setup my own, custom, overflow menu like dialog?

Thanks and best regards




Aucun commentaire:

Enregistrer un commentaire