xamarin/Xamarin.Forms

[Bug] [Android] Cannot add/remove menuitems at runtime to contextActions of a ViewCell

开放

#8,284 创建于 2019年10月29日

 (8 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/listviewe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

It is not possible to add or remove menuitems to a viewcell at runtime. This actually only does not work for Android.

Steps to Reproduce

  1. Clone this repository: https://github.com/BrayanKhosravian/AddMenuItemAtRuntime

  2. Select Android as startup project

  3. long press on one of the ViewCell which are visible inside the ListView (just to verify that there is only 1 MenuItem)

  4. Click the "Add"- Button to add a MenuItem at runtime

  5. Long click the same ViewCell

  6. result: no MenuItem was added

  7. try the same with remove

  8. to verify the behavior check the same steps for uwp and ios (result: MenuItems get added)

Expected Behavior

It should be able to add/remove MenuItem´s at runtime to a ViewCell. This works for Ios and UWP.

Actual Behavior

It is not possible to add/remove MenuItem´s at runtime to a ViewCell. This works for Ios and UWP.

Basic Information

  • Version with issue: v4.3.0908675 (lower versions as well)
  • Last known good version: -
  • IDE: Visual Studio 2019 v16.3.2
  • Platform Target Frameworks:
    • Android: 9.0
  • Android Support Library Version:
  • Nuget Packages: no external nugets
  • Affected Devices: tested with Huawei p20, but this is a generic issue

Reproduction Link

https://github.com/BrayanKhosravian/AddMenuItemAtRuntime

Screenshots

Not working on android droid_menuitem

Working on IOS

ios_menuitem

Working on UWP uwp_menuitem

贡献者指南