Auto generated menu item displays as "item 1" in the list but as "item 2" when selected

Blynk app 2.27.1 running on Android 8.10

I use dynamic menus which I populate at runtime. Sometimes the list of items that can be selected from have has only one entry. In this case, Blynk generates a second automatic entry that appears in the list as “Item 1”. When “Item1” is selected, it displays as “Item 2”.

Demonstration code - place a menu widget on V0

 BlynkParamAllocated items(10);
  items.add("A"); // only one item
  Blynk.setProperty(V0,"labels",items);  // we still have item1 in list but shows Item 2 when selected

Same result if the single item is created with:

Blynk.setProperty(V0,"labels","A");

This post is simply to describe the anomaly of the display not matching what is picked in the list.

An enhancement request to be able to have a menu with a single entry in it, is the subject of a separate roadmap submission. Blynk can handle zero entries, or 2 or more, but not one.

1 Like

Looks like it is a formatting bug, it will be fixed and I’ll allow one item menu list via set property.

I’ve uploaded new beta and release 2.27.2 builds to Google Play, they contain a fix to this issue.

Fantastic! thank you!

I can confirm that the issue is resolved and we can now have a single item! Great!

ah but, if the menu was previously empty and set to zero to show the hint, and one item is added, we cant open the picker to pick the single item.

Demo code for that issue placed in the Beta thread, so this thread can be closed.