Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9004] Android: Label widget cuts off long strings when width property is set

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-05-21T12:08:14.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sn/a
ComponentsAndroid
Labelscore
ReporterNeeraj Gupta
AssigneeAllen Yeung
Created2012-05-05T13:11:34.000+0000
Updated2017-03-30T21:25:37.000+0000

Description

Label widget cuts off long strings when width property is set. Here is the sample code the customer provided: Problem Scenario ---------------- Ti.UI.createLabel({ left: 11, top: 10, bottom: 10, color: "#2e0333", font: { fontSize: 14 }, width: 280, touchEnabled: false, height: Ti.UI.SIZE, text:'Very long string...' } ) Workaround Scenario (set width to .SIZE and add a right property) ------------------- Ti.UI.createLabel({ left: 11, top: 10, bottom: 10, color: "#2e0333", font: { fontSize: 14 }, width: Ti.UI.SIZE, right: 11 touchEnabled: false, height: Ti.UI.SIZE, text:'Very long string...' } )

Comments

  1. Neeraj Gupta 2012-05-05

    Try it out on both iOS and Android platforms before marking this bug resolved.
  2. Allen Yeung 2012-05-21

    I tried the fail case and the workaround in iOS/Android. I get the same behavior for both of them. The text as not cut off in either case.
  3. Lee Morris 2017-03-30

    Closing ticket as I am unable to reproduce the issue using the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source