Hey Guys,
I'm trying to create a simple To-Do-List App from scratch and I'm confused about the appearance of Ti.UI.-Elements.
Here is the setup:
Titanium SDK 2.1.3, Platform: iOS
addTodo.xml
<Alloy> <Window class="add"> <View id="addView"> <TextField id="name" /> </View> </Window> </Alloy>addTodo.tss
"Window": { backgroundColor:"white", barColor: "#444", }, ".add": { title: L('add') }, "#addView": { top: "5dp", left: "5dp", right: "5dp", bottom: "5dp", width: Ti.UI.FILL, height: Ti.UI.FILL, borderColor: "#444", borderRadius: 4, borderWidth: 1, layout: "vertical" }, "#name": { top: "5dp", left: "5dp", right: "5dp", height: "50dp", width: Ti.UI.FILL, hintText: L('name') }If I start the iPhone Simulator it comes to the following output:
https://s3-eu-west-1.amazonaws.com/renekiel/alloy.png
The TextField is rendered without any borders or the well-know default style that comes along when developing in Titanium without Alloy.
2 Answers
you need to apply those style inside you .tss file, I do not see any set in the code you provided above
Ok, so I need to set
"#name": { [...] borderStyle:Ti.UI.INPUT_BORDERSTYLE_ROUNDED }for example?
And what about Ti.UI.TextArea or Ti.UI.Switch? Beside borderColor, borderRadius and borderWidth I can't set any more border-related style information like borderStyle.
Your Answer
Think you can help? Login to answer this question!