这个在Windows下面可以用, 刚入门学, 感觉用javascript写起来很方便请问用这个软件写程序有没有什么局限?求解
解决方案 »
- 新人求助:UINavigationBar 的backbarButtonItem问题。
- 有人知道这个参数在twain 中怎么用啊
- 疑问:GCC编译器中关于long long的处理
- 我用imagePicker选到image 这个image的路径怎么取到呢
- iphone娱乐应用上架 (dreamspace1.0)求改进建议!
- 应用被其他程序打开时,如何切换至根视图
- 又一年光棍节~又一年单身汪的我T_T!
- UIButton控件的enable值设定为NO,按钮还是可以点击?小白求指导
- 新人初学ios,对于for循环遍历和forin循环遍历的使用场景很混乱,希望有人能指点迷津。
- ios开发中webView要拦截的网站能不能在拦截之前获取到
- 求大神指导,本人是小白。有关外部显示的问题,谢谢啦
- 我已经崩溃了.....
var platformWidth = Titanium.Platform.displayCaps.platformWidth;
var platformHeight = Titanium.Platform.displayCaps.platformHeight;
var platformWidth = Titanium.Platform.displayCaps.platformWidth;
var platformWidth = Titanium.Platform.displayCaps.platformWidth;var imgView = Titanium.UI.createView({
backgroundColor: "gray",
left: platformWidth * 0.05,
top: platformWidth * 0.05,
width: platformHeight * 0.2,
height: platformHeight * 0.2,
borderRadius: 10
});
//------------------------------------
var nameLable = Titanium.UI.createLabel({
color:'#999',
text:'Car Park Name:',
font:{fontSize:16,fontFamily:'Helvetica Neue'},
textAlign:'left',
left: platformWidth * 0.4,
top: platformWidth * 0.08,
width:'auto'
});
//------------------------------------
var dateLable = Titanium.UI.createLabel({
color:'#999',
text:'Date:',
font:{fontSize:16,fontFamily:'Helvetica Neue'},
textAlign:'left',
left: platformWidth * 0.4,
top: platformWidth * 0.2,
width:'auto'
});
//------------------------------------
var levelTxt = Ti.UI.createTextField({
center: {
x: platformWidth * 0.5,
y: platformWidth * 0.48
},
height : 35,
width : 280,
hintText : 'Level:',
//softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
keyboardType : Ti.UI.KEYBOARD_DEFAULT,
returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});levelTxt.addEventListener('return', function(e) {
levelTxt.blur();
alert('Input was: ' + levelTxt.value);
});
//------------------------------------
var areaTxt = Ti.UI.createTextField({
center: {
x: platformWidth * 0.5,
y: platformWidth * 0.65
},
height : 35,
width : 280,
hintText : 'Area:',
keyboardType : Ti.UI.KEYBOARD_DEFAULT,
returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});areaTxt.addEventListener('return', function(e) {
areaTxt.blur();
alert('Input was: ' + areaTxt.value);
});
//------------------------------------
var saveLable = Titanium.UI.createLabel({
color:'#999',
text:'Save current GPS location:',
font:{fontSize:14,fontFamily:'Helvetica Neue'},
textAlign:'left',
left: platformWidth * 0.08,
top: platformWidth * 0.8,
width:'auto'
});
//------------------------------------
var saveSwitch = Ti.UI.createSwitch({
value : true,
top : platformWidth * 0.8,
left : platformWidth * 0.7
});saveSwitch.addEventListener('change', function(e) {
Ti.API.info('Event value: ' + e.value + ', switch value: ' + saveSwitch.value);
});
//------------------------------------// Create a Button.
var saveButt = Ti.UI.createButton({
title : 'Save Information',
height : 38,
width : 260,
center: {
x: platformWidth * 0.5,
y: platformHeight * 0.677
},
});// Listen for click events.
saveButt.addEventListener('click', function() {
alert('\'saveButt\' was clicked!');
});// Add to the parent view.
Titanium.UI.currentWindow.add(saveButt);
Titanium.UI.currentWindow.add(saveSwitch);
Titanium.UI.currentWindow.add(saveLable);
Titanium.UI.currentWindow.add(areaTxt);
Titanium.UI.currentWindow.add(levelTxt);
Titanium.UI.currentWindow.add(nameLable);
Titanium.UI.currentWindow.add(dateLable);
Titanium.UI.currentWindow.add(imgView);