summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Cells/CellRenderer.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/Cells/CellRenderer.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/Cells/CellRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/CellRenderer.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Android/Cells/CellRenderer.cs b/Xamarin.Forms.Platform.Android/Cells/CellRenderer.cs
index d9d4eee5..e62a8d4e 100644
--- a/Xamarin.Forms.Platform.Android/Cells/CellRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/CellRenderer.cs
@@ -5,6 +5,7 @@ using Android.Views;
using Android.Widget;
using AView = Android.Views.View;
using Object = Java.Lang.Object;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Android
{
@@ -36,7 +37,7 @@ namespace Xamarin.Forms.Platform.Android
if (renderHolder != null)
{
Cell oldCell = renderHolder.Renderer.Cell;
- oldCell.SendDisappearing();
+ ((ICellController)oldCell).SendDisappearing();
if (Cell != oldCell)
SetRenderer(oldCell, null);
@@ -54,7 +55,7 @@ namespace Xamarin.Forms.Platform.Android
holder.Renderer = this;
Cell.PropertyChanged += PropertyChangedHandler;
- Cell.SendAppearing();
+ ((ICellController)Cell).SendAppearing();
Performance.Stop();
@@ -85,9 +86,10 @@ namespace Xamarin.Forms.Platform.Android
protected void WireUpForceUpdateSizeRequested(Cell cell, AView nativeCell)
{
- cell.ForceUpdateSizeRequested -= _onForceUpdateSizeRequested;
+ ICellController cellController = cell;
+ cellController.ForceUpdateSizeRequested -= _onForceUpdateSizeRequested;
- _onForceUpdateSizeRequested = delegate
+ _onForceUpdateSizeRequested = (sender, e) =>
{
// RenderHeight may not be changed, but that's okay, since we
// don't actually use the height argument in the OnMeasure override.
@@ -96,7 +98,7 @@ namespace Xamarin.Forms.Platform.Android
nativeCell.SetMinimumWidth(nativeCell.MeasuredWidth);
};
- cell.ForceUpdateSizeRequested += _onForceUpdateSizeRequested;
+ cellController.ForceUpdateSizeRequested += _onForceUpdateSizeRequested;
}
internal static CellRenderer GetRenderer(BindableObject cell)
@@ -120,7 +122,6 @@ namespace Xamarin.Forms.Platform.Android
}
renderer.OnCellPropertyChanged(sender, e);
- ;
}
class RendererHolder : Object