summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Cells
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
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')
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs1
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/CellFactory.cs1
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/CellRenderer.cs13
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/EntryCellRenderer.cs2
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/TextCellRenderer.cs3
-rw-r--r--Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs1
6 files changed, 13 insertions, 8 deletions
diff --git a/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs b/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs
index 7ae8aad5..74c56dbd 100644
--- a/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/BaseCellView.cs
@@ -9,6 +9,7 @@ using Android.Widget;
using AView = Android.Views.View;
using AColor = Android.Graphics.Color;
using AColorDraw = Android.Graphics.Drawables.ColorDrawable;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Android
{
diff --git a/Xamarin.Forms.Platform.Android/Cells/CellFactory.cs b/Xamarin.Forms.Platform.Android/Cells/CellFactory.cs
index 589236c3..0967fa16 100644
--- a/Xamarin.Forms.Platform.Android/Cells/CellFactory.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/CellFactory.cs
@@ -2,6 +2,7 @@ using Android.Content;
using Android.Views;
using AView = Android.Views.View;
using AListView = Android.Widget.ListView;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Android
{
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
diff --git a/Xamarin.Forms.Platform.Android/Cells/EntryCellRenderer.cs b/Xamarin.Forms.Platform.Android/Cells/EntryCellRenderer.cs
index 00330928..e46422a0 100644
--- a/Xamarin.Forms.Platform.Android/Cells/EntryCellRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/EntryCellRenderer.cs
@@ -58,7 +58,7 @@ namespace Xamarin.Forms.Platform.Android
void OnEditingCompleted()
{
- var entryCell = (EntryCell)Cell;
+ var entryCell = (IEntryCellController)Cell;
entryCell.SendCompleted();
}
diff --git a/Xamarin.Forms.Platform.Android/Cells/TextCellRenderer.cs b/Xamarin.Forms.Platform.Android/Cells/TextCellRenderer.cs
index cbaaa2b7..b678ee1c 100644
--- a/Xamarin.Forms.Platform.Android/Cells/TextCellRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/TextCellRenderer.cs
@@ -3,6 +3,7 @@ using Android.Content;
using Android.Views;
using AView = Android.Views.View;
using AColor = Android.Graphics.Color;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Android
{
@@ -59,7 +60,7 @@ namespace Xamarin.Forms.Platform.Android
var cell = (TextCell)Cell;
View.MainText = cell.Text;
- if (!TemplatedItemsList<ItemsView<Cell>, Cell>.GetIsGroupHeader(cell))
+ if (!cell.GetIsGroupHeader<ItemsView<Cell>, Cell>())
View.SetDefaultMainTextColor(Color.Accent);
else
View.SetDefaultMainTextColor(Color.Default);
diff --git a/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs b/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs
index 4bf83395..9604364a 100644
--- a/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Cells/ViewCellRenderer.cs
@@ -1,6 +1,7 @@
using Android.Content;
using Android.Views;
using AView = Android.Views.View;
+using Xamarin.Forms.Internals;
namespace Xamarin.Forms.Platform.Android
{