I am trying to get this effect for text in titanium/appcelerator (latest).
so - after research I came up with this..
var win = Ti.UI.createWindow({
backgroundColor: '#333',
exitOnClose: true,
fullscreen: false,
layout: 'vertical',
title: 'Label Demo'
});
var label1 = Ti.UI.createLabel({
color: '#000',
font: {
fontSize: 32,
fontFamily: 'Papyrus',
fontWeight: 'bold'
},
shadowColor: '#aaa',
shadowOffset: {
x: 2,
y: 2
},
shadowRadius: 0,
viewShadowColor: '#fff',
viewShadowRadius: 24,
text: 'A simple label',
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,
top: 30,
width: Ti.UI.SIZE,
height: Ti.UI.SIZE
});
win.add(label1);
win.open();
and unfortunately it give me a rather dull effect. It is not very pleasing as the code only offset the layer 2 text a little and I have this effect.
please help. I am trying to get a sticker effect and not just a shadow of the text.
thanks
答案 0 :(得分:0)
您可以在标签上使用attributedStrings
添加样式:http://docs.appcelerator.com/platform/latest/#!/guide/Attributed_Strings