Such as thing as padding ?
I have an app that has a a view with rounded corners, and inside that view I have added a text box. In the text box, I have a left:10, but it seems to but up against it. I've tried left:50 just to see a difference, but it stays in the same spot.
var controlsView = Ti.UI.createView({
width:270,
top:25,
height:'auto'
});
var tf1 = Titanium.UI.createTextField({
width:250,
fontSize:10,
backgroundColor:'#ffffff',
height:45,
left:10,
top:10,
borderRadius:5,
autocorrect:true,
hintText:'Add a quick title...'
});
controlsView.add(tf1);
1 Answer
-
Accepted Answer
Josh,
In your posted code, the left:10 refers to where the text field boundaries will appear within the controlsView bounds. It does not impact where text will appear within the bounds of the text field itself. For that, try adding the paddingLeft and paddingRight properties. Perhaps:
left:10,
top:10,
borderRadius:5,
paddingLeft:5,
paddingRight:5,etc