xamarin/Xamarin.Forms

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

Aberta

#8.284 aberto em 29 de out. de 2019

 (8 comentários) (0 reação) (0 responsável)C# (1.926 forks)batch import
a/listviewe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Métricas do repositório

Stars
 (5.644 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador