// Custom View var view0 = Titanium.UI.createView({ width: 320, height: 460, backgroundColor: '#aaaaaa' }); var weightField = Titanium.UI.createTextField({ borderStyle: Titanium.UI.INPUT_BORDERSTYLE_ROUNDED, left: 80, top: 236, width: 160, height: 31, value: '', color: '#000000' }); view0.add(weightField); var datePicker = Titanium.UI.createPicker({ width: 320, height: 216 }); datePicker.selectionIndicator = true; datePicker.type = Titanium.UI.PICKER_TYPE_DATE_AND_TIME; view0.add(datePicker); var cancelButton = Titanium.UI.createButton({ left: 80, top: 357, width: 160, height: 35, font: {fontFamily: 'Helvetica-Bold', fontSize: 15}, title: 'キャンセル', color: '#324f85' }); cancelButton.addEventListener('click', function() { // write the code here }); view0.add(cancelButton); var saveButton = Titanium.UI.createButton({ left: 80, top: 296, width: 160, height: 35, title: 'この値で保存する', color: '#ff0000' }); saveButton.addEventListener('click', function() { // write the code here }); view0.add(saveButton); var weightUnit = Titanium.UI.createLabel({ left: 248, top: 239, width: 42, height: 21, text: 'Kg', color: '#000000' }); view0.add(weightUnit);