Hello, I have a problem with dynamicly adding and removing items from RadialMenu, i would like to remove "connect" item with "disconnect". I was trying to call radialMenu.Invalidate after change but without success.
I was trying something like this (the item that i would like to switch is under ):
if (args.IsConnected)
{
_radialMenu.Items[1] = _disconnectItem;
}
else
{
_radialMenu.Items[1] = _connectItem;
}
_radialMenu.Invalidate();
i was trying like this:
if (args.IsConnected)
{
_radialMenu.Items.Remove(_connectItem);
_radialMenu.Items.Add(_disconnectItem);
}
else
{
_radialMenu.Items.Remove(_disconnectItem);
_radialMenu.Items.Add(_connectItem);
}
_radialMenu.Invalidate();
the only solution that it was working was when menu was opened, so i ended up with this:
_radialMenu.Show(); if (args.IsConnected)
{
_radialMenu.Items[1] = _disconnectItem;
}
else
{
_radialMenu.Items[1] = _connectItem;
}
_radialMenu.Invalidate();
_radialMenu.Close();
But its hacky and its blinking when its closed, and its working only if _radialMenu.LayoutType = LayoutType.Default, its not working in LayoutType.Custom
Anybody have any idea how to make it correctly? There is no documentation fo RadialMenu in Xamarin.Android, so its hard to find any information about this.