titaniumtitanium-alloytitanium-modulestitanium-android

How to know the view id of currently visible view in Titanium Android Alloy App


I want to find out the id of currently visible in Titanium Android Alloy App using index.js controller.

How can I do so? I tried the below code in index.js, but its throwing error.

console.log(mainwin.view.id);

Solution

  • try something like this:

    mainwin.getView().id