diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Android/CellAdapter.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/CellAdapter.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Xamarin.Forms.Platform.Android/CellAdapter.cs b/Xamarin.Forms.Platform.Android/CellAdapter.cs index 03957d37..7664834b 100644 --- a/Xamarin.Forms.Platform.Android/CellAdapter.cs +++ b/Xamarin.Forms.Platform.Android/CellAdapter.cs @@ -174,12 +174,10 @@ namespace Xamarin.Forms.Platform.Android view.SetBackgroundResource(0); } - internal void CloseContextAction() + internal void CloseContextActions() { - if (_actionMode != null) - _actionMode.Finish(); - if (_supportActionMode != null) - _supportActionMode.Finish(); + _actionMode?.Finish(); + _supportActionMode?.Finish(); } void CreateContextMenu(IMenu menu) @@ -226,8 +224,7 @@ namespace Xamarin.Forms.Platform.Android { if (!cell.HasContextActions) { - _actionMode?.Finish(); - _supportActionMode?.Finish(); + CloseContextActions(); return false; } |