xamarin/Xamarin.Forms

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

Offen

#8.284 geöffnet am 29.10.2019

 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (1.926 Forks)batch import
a/listviewe/4 :clock4:help wantedinactivep/Androidt/bug :bug:up-for-grabs

Repository-Metriken

Stars
 (5.644 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide