Search code examples
titaniumappceleratorappcelerator-mobiletitanium-alloytitanium-widgets

titanium alloy widget assets folder path


I have a problem referencing the assets (image) folder path for my widget on an ImageView.

I have the header widget and I want to add the home button image. the home.png is stored into /widgets/widget.folder/assets/home.png

The documentation says that I should use the WPATH('home.png') macro. I Ti.API.info(WPATH('home.png')) it and it excludes the assets folder, saying /widget.folder/home.png and the $.lbutton.image = WPATH('home.png'); command doesn't show the image I want. why?


Solution

  • I solved changing the ImageView into a Label and assinging Label.backgroundImage to '/image.png' stored into the assets folder of the project. but don't know why ImageView.image doesn't display the image with the same path.