you would need to store the selection from the superior menu when entering the sub-menu. Later when you go back to the superior menu, you select the previously stored menu item and ensure that it is visible. So far I see, your code seems to be correct. Why it does not work, is difficult to say.
Another approach would be to use PresentDialog() when you enter a sub-menu and DismissDialog() when you navigate back to the superior menu. In this manner, the superior menu remains in RAM so its state (selection, etc.) are valid when you return to the menu. The methods PresentDialog() and DismissDialog() can be invoked with optional transition objects. These are not only useful for animations but by specifying transition objects in the diverse parameters of the above mentioned methods you can control the appearance of the superior and sub-menu. For example, both can be displayed simultaneously or (what you probably intend) the superior menu disappears automatically while the sub-menu is visible. In such case see the method parameters aOverlayTransition and aRestoreTransition. See also: Perform Dialog transitions with animations.
Does it help you further?
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!