zoukankan      html  css  js  c++  java
  • 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();
  • 相关阅读:
    Mysql 从入门到遗忘
    Centos7开放及查看端口
    创建及修改数据库
    02_python是一种什么语言?
    03_SQL server数据类型
    02_关系数据库
    01_初识数据库
    kali 更新源
    01_Python简介
    Alertmanager高可用
  • 原文地址:https://www.cnblogs.com/xiaozhanga4/p/2400785.html
Copyright © 2011-2022 走看看