[TIMOB-24670] lines in label doesn't work on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-06-23T01:31:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.1 |
Components | n/a |
Labels | n/a |
Reporter | ILAY SENER |
Assignee | Joshua Quick |
Created | 2017-04-21T03:02:52.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
Screen Shot 2017-04-21 at 12.51.58.png | 2017-04-21T03:01:38.000+0000 | 153912 |
Screen Shot 2017-04-21 at 12.52.28.png | 2017-04-21T03:01:33.000+0000 | 236502 |
Looks like a SDK issue.
PR (6.1.x): https://github.com/appcelerator/titanium_mobile/pull/9161
FR Passed for 6.1.1.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/9175
FR passed for master.
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
Does it fix these weird 3 dots "..." in the middle of the text? I was having it a lot before!
[~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.
[~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/