The-IT
The-IT

Reputation: 728

Create page division / format page?

I need to create a page division in Alloys XML, like a <div> tag in HTML

Basically it needs to be able to be variable size, have attributes like font, colour, border ETC and most importantly it needs to have sub tags such as label and button inside

I've tried using sperate views from this and requiring them into the current window. I've also tried using modules, but I'm not sure if I did it correctly.

My question is, what would be the best way to go around this?

Upvotes: 0

Views: 40

Answers (1)

miga
miga

Reputation: 4055

You can create a Widget for this: https://wiki.appcelerator.org/display/guides2/Alloy+Widgets

It is basically a reusable component which you can pass parameters into and it has a own controller, style and view file.

In your XML file you can use it like this: <Widget src="foo" name="button"/>

Upvotes: 1

Related Questions