Skip to content

Commit 5e78f1b

Browse files
fixed android bug
1 parent e0fd6f4 commit 5e78f1b

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

ContextMenu.Droid/ContextMenuScrollViewRenderer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
[assembly: ExportRenderer(typeof(ContextMenuScrollView), typeof(ContextMenuScrollViewRenderer))]
1616
namespace ContextMenu.Droid
1717
{
18+
[EditorBrowsable(EditorBrowsableState.Never)]
1819
[Obsolete]
1920
[Preserve(AllMembers = true)]
2021
public class ContextMenuScrollViewRenderer : ScrollViewRenderer

ContextMenu.Droid/ContextMenuViewRenderer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public override void OnAttachedToWindow()
127127

128128
var attachedField = typeof(ScrollViewRenderer).GetField("_isAttached", BindingFlags.NonPublic | BindingFlags.Instance);
129129
attachedField.SetValue(this, false);
130+
(Element as BaseContextMenuView)?.ForceClose(false);
130131
}
131132

132133
protected override void OnDetachedFromWindow()

ContextMenuSample/ContextMenuSample/ViewModels/BaseItemsViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class BaseItemsViewModel : BaseViewModel
1212
public ICommand DeleteCommand => _deleteCommand ?? (_deleteCommand = new Command(item =>
1313
{
1414
var model = item as Item;
15-
model?.ForceCloseCommand?.Execute(false); // OneWayToSource binding. So we call Close method without animation
15+
//model?.ForceCloseCommand?.Execute(false); // OneWayToSource binding. So we call Close method without animation
1616
Items.Remove(model);
1717
}));
1818

0 commit comments

Comments
 (0)