Bug 21490 - ToobarItems do not show on Android
Summary: ToobarItems do not show on Android
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-07-21 17:07 UTC by Jacob Ebey
Modified: 2015-01-08 11:26 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Shared files that shows what works in WinPhone and not Android. (758 bytes, text/plain)
2014-07-21 17:10 UTC, Jacob Ebey
Shared files that shows what works in WinPhone and not Android. (1.01 KB, text/plain)
2014-07-21 17:11 UTC, Jacob Ebey
To verify the problem/fix. (94.35 KB, application/x-zip-compressed)
2014-09-11 17:23 UTC, Jacob Ebey

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jacob Ebey 2014-07-21 17:07:11 UTC
With Xamarin.Forms ToobarItems do not show up on the Android Platform. I have attached a project showing the code.

I am on Windows 8.1 using a Samsung Galaxy S3 with android 4.4.2.

The windows phone it works on (I'm assuming all but have only use the one) is a Nokia Lumia 521 running Windows Phone 8.1.
Comment 1 Jacob Ebey 2014-07-21 17:10:44 UTC
Created attachment 7438 [details]
Shared files that shows what works in WinPhone and not Android.
Comment 2 Jacob Ebey 2014-07-21 17:11:00 UTC
Created attachment 7439 [details]
Shared files that shows what works in WinPhone and not Android.
Comment 3 Eric Maupin 2014-07-22 16:22:22 UTC
Can you confirm this is fixed in 1.2.2-pre2?
Comment 4 Jacob Ebey 2014-07-22 17:20:46 UTC
Where is the download center at for the pre-releases?
Comment 5 Eric Maupin 2014-07-22 17:22:14 UTC
In the NuGet update window, check "Include Prereleases".
Comment 6 Jacob Ebey 2014-07-22 17:26:18 UTC
No it is not. There are still no ToolbarItems shown on android.
Comment 7 Jason Smith [MSFT] 2014-07-22 18:04:51 UTC
Thank you Jacob, I am looking into this repro specifically right now.
Comment 8 Jacob Ebey 2014-07-22 18:07:50 UTC
Thank you Jason, It worked in version 1.0.6186. I did not use any intermediate releases between 1.0.6186 and 1.2.1 so I can not pinpoint the release that broke it for sure.
Comment 9 Jason Smith [MSFT] 2014-07-22 21:06:01 UTC
Welp, egg on face for me. I forgot to push the one line that actually fixes this particular case for 1.2.2-pre2. Will make sure its fixed for 1.2.2-pre3.
Comment 10 Jason Smith [MSFT] 2014-07-22 21:15:01 UTC
Just so you know, the fix is literally deleting a line of code, thought you might enjoy that :)
Comment 11 Jacob Ebey 2014-07-28 13:25:01 UTC
Got the 1.2.2-pre3 update today and just wanted to say that I have not noticed any new problems as of yet. If anything changes or any other problems are found I will report. Thank you for the quick fix Jason.

Comment 12 Jacob Ebey 2014-09-11 17:20:04 UTC
I think someone forgot to commit.... As of the newest beta ( this problem resurfaced. The latest official release has the fix though. Please re-enable on latest beta.
Comment 13 Jacob Ebey 2014-09-11 17:23:01 UTC
Created attachment 8004 [details]
To verify the problem/fix.
Comment 14 Rui Marinho 2015-01-08 11:26:11 UTC
This problem is fixed 1.3.0 or 1.3.1, but theres 1 thing you need to take in attention. ToolbarItems need a NavigationPage on the stack so they can be rendered, so you need to wrap you tabs in a navigation page to show the ToolbarButton, here's how i changed your sample to work ok
and the link for the full project:

DemoPage is just a empty ContentPage
On GetMainPage

var view = new Views.HomeTabbedView();
view.Children.Add(new NavigationPage(new DemoPage()){ Title ="Page 1"});
view.Children.Add(new NavigationPage(new DemoPage()){ Title ="Page 2"});

And on HomeTabbedView 
class HomeTabbedView : TabbedPage
        public HomeTabbedView()
			var addItem = new ToolbarItem("Add", "add.png", async () => await Navigation.PushModalAsync(new BrokenToolbar.App.DemoPage()));