Use of widgets
Widgets are self-contained components that can be easily dropped into Alloy-powered Titanium projects. They were conceived as a way to reuse code in multiple applications or to be used multiple times in the same application. Widgets have their own views, controllers, styles and assets and are laid out the same as the app directory in the Alloy project.
Importing widgets to titanium project
sample widget(Bootstrap like buttons)
1) Download the widget from the link above
2) create a folder inside the app folder with the name widgets
3) paste the nl.fokkezb.button folder
4) modify config.json
5) Use of the widget
<Widget src=”nl.fokkezb.button”Â title=”Okay” style=”bs-success”Â height=”40″ onClick=”btnSkiptute” />
Replace style=”bs-success” with bs-default,bs-warning,bs-inverse and get new styles.
If you are a beginner to titanium development my instruction is to use pre developed widgets and with experience develop widgets your self.
Use of Modules
use https://marketplace.appcelerator.com/ and google and grab a module
navigate to dist folder(android) you’ll find a zip folder extract and copy the folder to titanium home
you can find the titanium home when you go to preferences->platform->Titanium Home
Navigate to module section and paste the module folder
Use the app.js under example of each module which gives you an overall code example so no need of tutorials.
feel free to comment on this post if you need any help regarding this topic