【问题标题】:In Titanium, how to add the view at the specified position在 Titanium 中,如何在指定位置添加视图
【发布时间】:2012-01-23 07:39:39
【问题描述】:

在Titanium中,如何在指定位置添加视图?类似android adk addView(view, index);中的方法

【问题讨论】:

    标签: android titanium


    【解决方案1】:
    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);
    

    【讨论】:

      【解决方案2】:
      var new_view = Ti.UI.createView({
           top:20,
           left:20,
           height:200,
           width:200,
           backgroundColor:'#000000'
      });
      
      //Add this to window
      win.add(new_view)
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-04-17
        • 1970-01-01
        • 2018-10-19
        相关资源
        最近更新 更多