Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7604] MobileWeb: Ti.UI.Label doesn't support newlines or tabs

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-02-16T14:10:31.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sSprint 2012-04, Release 2.0.0
ComponentsMobileWeb
Labelsqe-port
ReporterChris Barber
AssigneeBryan Hughes
Created2012-02-09T15:41:10.000+0000
Updated2012-08-16T11:04:10.000+0000

Description

Need to support \n and \t in labels.
var win = Titanium.UI.createWindow({  
    backgroundColor:'#fff',
    layout: 'vertical'
});

win.add(Titanium.UI.createLabel({
	text:"Line 1\nLine2\n\tTabbed line 3\nLine 4",
	backgroundColor: "#9A0707",
	border: 1,
	color: "#fff",
	font:{fontSize:14,fontFamily:'Helvetica Neue'},
	textAlign:'left',
	left:5,
	right: 5,
	top: 5,
	height:'auto'
}));

win.open();

Attachments

FileDateSize
app.js2012-02-15T16:50:48.000+0000912
Screen Shot 2012-02-09 at 3.41.29 PM.png2012-02-09T15:41:53.000+000090915
Screen Shot 2012-02-09 at 3.42.38 PM.png2012-02-09T15:42:48.000+000029589

Comments

  1. Bryan Hughes 2012-02-14

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/1417
  2. Lokesh Choudhary 2012-08-16

    Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120816015712 Android 4.0.4 - default ,chrome 18.0 , firefox 14.0.1 Iphone 5.1.1 - safari mobile Mountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1 Win 7 - IE 9

JSON Source