summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs b/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
index 51c603c4..245c3d74 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/ListViewAdapter.cs
@@ -54,9 +54,9 @@ namespace Xamarin.Forms.Platform.Android
var platform = _listView.Platform;
if (platform.GetType() == typeof(AppCompat.Platform))
- MessagingCenter.Subscribe<AppCompat.Platform>(this, AppCompat.Platform.CloseContextActionsSignalName, p => CloseContextAction());
+ MessagingCenter.Subscribe<AppCompat.Platform>(this, AppCompat.Platform.CloseContextActionsSignalName, p => CloseContextActions());
else
- MessagingCenter.Subscribe<Platform>(this, Platform.CloseContextActionsSignalName, p => CloseContextAction());
+ MessagingCenter.Subscribe<Platform>(this, Platform.CloseContextActionsSignalName, p => CloseContextActions());
}
public override int Count
@@ -321,7 +321,7 @@ namespace Xamarin.Forms.Platform.Android
{
if (disposing)
{
- CloseContextAction();
+ CloseContextActions();
var platform = _listView.Platform;
if (platform.GetType() == typeof(AppCompat.Platform))
@@ -445,6 +445,9 @@ namespace Xamarin.Forms.Platform.Android
void OnDataChanged()
{
+ if (ActionModeContext != null && !TemplatedItemsView.TemplatedItems.Contains(ActionModeContext))
+ CloseContextActions();
+
if (IsAttachedToWindow)
NotifyDataSetChanged();
else