Changing the look of your app with styles
One of the cool features of Alloy is the ability to separate the visual elements of your app from your code. This can be done via XML files, as we've already done, or you can use Alloy TSS styles to apply properties to elements in a view. In this recipe, we'll be updating the code from the last recipe and moving our styling into a separate file.
Looking back at the previous recipe, we have a view containing the following XML:
<Alloy> <Window backgroundColor="white" layout="vertical"> <Label id="myLabel" borderRadius="2" top="40" borderColor="#CCC" height="35" width="200"/> <Button id="myButton" borderRadius="2" backgroundColor="#35e" color="#fff" top="10" height="35" width="100">Click me!</Button> </Window> </Alloy>
In this example, we defined...