Last Updated: February 25, 2016
·
4.488K
· denver

Padding Top and Padding Bottom in Appcelerator Titanium

Add a view with your padding amount as height to the view who needs to get the padding.

var viewWithPadding = Titanium.UI.createView({ height: Ti.UI.SIZE, backgroundColor: '#000000' });

var paddingView = Titanium.UI.createView({ height: '10dp' });

viewWithPadding.add(paddingView);

Tadaa! Now there is 10dp padding at your view.