• titanium开发教程0104使用label view


    1

    var win = Titanium.UI.createWindow({
    	title:"文本视图",
    	backgroundColor:"#FFFFFF",
    	exitOnClose:true
    })
    
    var label01 = Titanium.UI.createLabel({
    	text:"文本标签 01",
    	top:0,
    	left:0,
    	height:24,
    	"100%",
    	textAlign:"center",
    	color:"#FFFFFF",
    	backgroundColor:"#363F45"
    });
    
    var label02 = Titanium.UI.createLabel({
    	text:"文本标签 02",
    	top:24,
    	right:0,
    	height:36,
    	"75%",
    	textAlign:"left",
    	color:"#000000",
    	backgroundColor:"#FEB41C",
    });
    
    var label03 = Titanium.UI.createLabel({
    	text:"文本标签 03",
    	bottom:0,
    	height:"25%",
    	"75%",
    	textAlign:"right",
    	font:{fontSize:36, fontStyle:"italic"},
    	color:"#F1ECB5",
    	backgroundColor:"#371740",
    });
    
    var label04 = Titanium.UI.createLabel({
    	text:"文本标签 04" //默认情况下,标签的位置在该屏幕的中心,左对齐
    })
    
    win.add(label01);
    win.add(label02);
    win.add(label03);
    win.add(label04);
    
    win.open();
  • 相关阅读:
    文档测试
    浅谈兼容性测试
    配置测试
    测试产品说明书
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    LeetCode
  • 原文地址:https://www.cnblogs.com/xiaozhanga4/p/2400785.html
Copyright © 2020-2023  润新知