Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2992] Android - Labels don't truncate

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T03:34:20.000+0000
Affected Version/sn/a
Fix Version/sBacklog
ComponentsAndroid
Labelsandroid, label
ReporterPedro Enrique
AssigneeDon Thorp
Created2011-04-15T03:34:20.000+0000
Updated2017-03-02T18:17:11.000+0000

Description

If a label has a height set and the text does not fit, it is cut off without the three ellipsis dots.
Example:

var win = Ti.UI.createWindow({backgroundColor:'#ccc'});
var commentLabel = Ti.UI.createLabel({
  color:'#000',
  backgroundColor:'#999',
  font:{fontSize:18, fontFamily:'Arial'},
  left:5,
  top:20,
  height:18,
  width:300,
  text:'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce mollis vestibulum dapibus. Donec dapibus blandit nisi sagittis molestie. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec id enim at arcu suscipit dapibus',
  ellipsize: true,
  minimumFontSize: 10
});
win.add(commentLabel);
win.open();

This behavior is also seen in the Kitchen Sink. Controls -> Label -> Basic. Blue text is cut off at the bottom.

Android SDK = APIs 2.2, Screen = HVGA
Ti SDK 1.6 (Jan 27 2011 18:59 re46f49ac)

Comments

  1. Pedro Enrique 2011-04-15

    This was discovered by a Help Desk Ticket:
    http://developer.appcelerator.com/helpdesk/view/66131">http://developer.appcelerator.com/helpdesk/view/66131

  2. Pedro Enrique 2011-04-15

    Missing wordWrap : false

    Invalid

  3. Lee Morris 2017-03-02

    Closing as invalid.

JSON Source