![](/img/trans.png)
[英]Is it possible to have multiple colors with a Titanium Appcelerator button bar? Titanium.UI.createButtonBar
[英]How can I add images as labels on Titanium.UI.CreateButtonBar?
這是我的代碼,我想用圖像替換“開始”,“暫停”和“停止”
var controlBar = Titanium.UI.createButtonBar({
labels: ['START','PAUSE','STOP'],
style: Titanium.UI.iPhone.SystemButtonStyle.BAR,
backgroundColor: '#000080',
top:10,
width:200,
height:40
});
labels
屬性也可以是BarItemType的數組
var controlBar = Titanium.UI.createButtonBar({
labels: ['START','PAUSE', {
image : '/path/to/image',
title : 'Title',
enabled : true
}],
style: Titanium.UI.iPhone.SystemButtonStyle.BAR,
backgroundColor: '#000080',
top:10,
width:200,
height:40
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.