summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Platform.cs
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-06-17 03:10:18 -0700
committerRui Marinho <me@ruimarinho.net>2016-06-17 11:10:18 +0100
commit925fc0aa588a060eb23fa16c1d225dd030012c23 (patch)
tree83676c25c29d97d9250516b217020ba85425796d /Xamarin.Forms.Platform.Android/Platform.cs
parentd44396a4534b1e2bc81143c809e4adaee656ab15 (diff)
downloadxamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.gz
xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.tar.bz2
xamarin-forms-925fc0aa588a060eb23fa16c1d225dd030012c23.zip
Prep Cell & friends for removal of InternalsVisibleTo (#142)
* Prep Cell & friends for removal of InternalsVisibleTo Includes: - Cell - EntryCell - ListView - MenuItem - TableView - ViewCell - Toolbar Moved extensions to Internal & removed TPH * Update docs * [Controls] Ignore Issue2411 on iOS <9 * [Controls] Formatting for Issue2411
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Platform.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Platform.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs
index 65c3b8cf..4561fa8f 100644
--- a/Xamarin.Forms.Platform.Android/Platform.cs
+++ b/Xamarin.Forms.Platform.Android/Platform.cs
@@ -15,6 +15,7 @@ using Android.Views;
using Android.Widget;
using Xamarin.Forms.Platform.Android.AppCompat;
using FragmentManager = Android.Support.V4.App.FragmentManager;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Android
{
@@ -347,12 +348,13 @@ namespace Xamarin.Forms.Platform.Android
foreach (ToolbarItem item in _toolbarTracker.ToolbarItems)
{
+ IMenuItemController controller = item;
item.PropertyChanged += HandleToolbarItemPropertyChanged;
if (item.Order == ToolbarItemOrder.Secondary)
{
IMenuItem menuItem = menu.Add(item.Text);
- menuItem.SetEnabled(item.IsEnabled);
- menuItem.SetOnMenuItemClickListener(new GenericMenuClickListener(item.Activate));
+ menuItem.SetEnabled(controller.IsEnabled);
+ menuItem.SetOnMenuItemClickListener(new GenericMenuClickListener(controller.Activate));
}
else
{
@@ -363,9 +365,9 @@ namespace Xamarin.Forms.Platform.Android
if (iconBitmap != null)
menuItem.SetIcon(iconBitmap);
}
- menuItem.SetEnabled(item.IsEnabled);
+ menuItem.SetEnabled(controller.IsEnabled);
menuItem.SetShowAsAction(ShowAsAction.Always);
- menuItem.SetOnMenuItemClickListener(new GenericMenuClickListener(item.Activate));
+ menuItem.SetOnMenuItemClickListener(new GenericMenuClickListener(controller.Activate));
}
}
}