Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24670] lines in label doesn't work on Android

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-06-23T01:31:47.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.1
Componentsn/a
Labelsn/a
ReporterILAY SENER
AssigneeJoshua Quick
Created2017-04-21T03:02:52.000+0000
Updated2017-06-29T20:39:39.000+0000

Description

lines in label doesn't work. Have example showing that 'maxLines' work, but not 'lines' *index.xml*

Attachments

FileDateSize
Screen Shot 2017-04-21 at 12.51.58.png2017-04-21T03:01:38.000+0000153912
Screen Shot 2017-04-21 at 12.52.28.png2017-04-21T03:01:33.000+0000236502

Comments

  1. Feon Sua Xin Miao 2017-05-09

    Looks like a SDK issue.
  2. Joshua Quick 2017-06-19

    PR (6.1.x): https://github.com/appcelerator/titanium_mobile/pull/9161
  3. Lokesh Choudhary 2017-06-23

    FR Passed for 6.1.1.
  4. Joshua Quick 2017-06-23

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/9175
  5. Lokesh Choudhary 2017-06-23

    FR passed for master.
  6. Lokesh Choudhary 2017-06-23

    Verified the fix. Test info in the PR. Closing. Studio Ver: 4.9.0.201705302345 SDK Ver: 6.2.0.v20170623140932, 6.1.1.v20170623141152 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.2.2 Ti CLI Ver: 5.0.14 Alloy Ver: 1.9.11 Node Ver: 6.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Pixel — Android 7.1.1 ⇨ google Nexus 5 — Android 6.0.1
  7. Carlos Henrique Zinato 2017-06-28

    Does it fix these weird 3 dots "..." in the middle of the text? I was having it a lot before!
  8. Joshua Quick 2017-06-28

    [~chmiiller], we haven't seen the particular issue you've mentioned. The issue we were seeing was that the "lines" property was being ignored. Or setting particular properties would reset prior label property settings, which was causing confusion. With our newest changes, the "lines" property will now be respected and will only apply ellipsis "..." at the end of the text if it doesn't fit the number of line set. If you've never set the "maxLines" property, then the number applied to the "lines" property will act as the max lines where ellipsis will be applied. Also note that "lines" is partly intended to set the height of the labels based on the font's line height. So, if you set the line height to 3 and the text only has 1 line, the label will still be 3 lines high, which is by design. Unfortunately, we currently don't support applying ellipsis based on the "height" property, like how it works on iOS. Also, if you set the "ellipsize" property to START or MIDDLE, it'll force the label into single-line mode. This is an Android limitation, but I also think it makes sense that it works that way anyways.
  9. Joshua Quick 2017-06-29

    [~chmiiller], this fix is available now via our 6.1.1 release. If you can give it a try and let us know whether or not it solves your ellipsis "..." issues then that would be great! https://www.appcelerator.com/blog/2017/06/ga-release-of-titanium-sdk-6-1-1-and-hyperloop-2-1-2/

JSON Source