Create page division / format page?

42 Views Asked by At

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?

1

There are 1 best solutions below

0
miga On

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"/>