Xamarin.Plugins
Xamarin.Plugins copied to clipboard
Forms-Android Toolbar click not working
iOS works perfectly.
In the main activity of android i have added this:
//Iconize
Plugin.Iconize.Iconize.With(new Plugin.Iconize.Fonts.FontAwesomeModule());
FormsPlugin.Iconize.Droid.IconControls.Init(Resource.Id.toolbar,Resource.Id.sliding_tabs);
I initiate the pages with the IconNavigationPage instead of the NavigationPage
<ContentPage.ToolbarItems>
<iconize:IconToolbarItem Icon="fa-comments-o" IconColor="White" Clicked="Handle_FeedbackClick" />
<iconize:IconToolbarItem Icon="fa-tags" IconColor="White" Clicked="Handle_ClaimsClick" />
</ContentPage.ToolbarItems>
I can see the Icons and the toolbar but the click doesnt do anything at all. If I replace the IconNavigationPage back to NavigationPage and use normal toolbar items the clicks work again.
What is this sorcery ?
Really nobody had this problem :| ?
Activate and Click don't work.
Workaround: Use the Command function.
Same problem here, Clicked don't work if IconNavigationPage is used.
You can use Command and refer to the method. Works the same
@DomResc did you stick to NavigationPage instead?
I can confirm this doesn't work.
In my case, I needed the event and cannot use a Command. Is anyone looking at this?
Command binding works the first time, but nothing fired after then :(
The same thing :S. @tuyen-vuduc if you add an IconToolbarItem
instance in a ContentPage programmatically, it works. For instance:
ToolbarItems.Add(new IconToolbarItem
{
Icon = "fa-building", IconColor = Color.White, Command = new
Command(OnToolbarItemClick)
});