在Titanium中,如何在指定位置添加视图?就像android adk addView(view,index)中的方法一样;
答案 0 :(得分:0)
var r_view = Ti.UI.createView({
top:2,
height:100,
width:Ti.Platform.displayCaps.platformWidth,
borderColor:'#225A94',
backgroundColor:'#EEF5FB',
borderRadius:8,
borderWidth:1
});
//Add in window name
win.add(r_view);
答案 1 :(得分:0)
var new_view = Ti.UI.createView({
top:20,
left:20,
height:200,
width:200,
backgroundColor:'#000000'
});
//Add this to window
win.add(new_view)