[TIMOB-19235] Android: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_X not working on 4.1.0 when using left and right to define width
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-08-13T03:14:27.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | label |
Reporter | Shawn Lan |
Assignee | Hieu Pham |
Created | 2015-07-17T22:22:32.000+0000 |
Updated | 2017-03-16T22:08:52.000+0000 |
Description
Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_END, Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MIDDLE, Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_START are not working if you use "left" and "right" to define a label's width. Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MARQUEE still works in such case.
Before 4.1.0, I can just set Label's ellipsize to true to show the ellipses in the end, even if I use "left" and "right" to define a label's width. On 4.1.0, ellipsize = true isn't working at all.
To re-produce, create an Alloy default project with the following:
index.xml:
<Alloy>
<Window class="container">
<Label id="label" onClick="doClick" height="Ti.UI.SIZE" left="13" right="13" ellipsize="Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_END" wordWrap="false">Hello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, WorldHello, World</Label>
</Window>
</Alloy>
index.tss
".container": {
backgroundColor:"white"
}
"Label": {
color: "#000"
}
[~shawnlan] can you please attach a test case and steps to reproduce the issue? Thanks
I updated the description. Please take a look.
[~shawnlan] we need a functional test case that reproduces the issue, can you please attach a runnable test case? Thanks
Okay I updated the description with the test case. Please take a look. The problem actually only exists if you use "left" and "right" to define a label's width. See my updated description for details. Thanks.
Hello, [~rtlechuga], I have tested this issue with the test case provided above in SDK 4.1.0.GA, It's a valid bug with SDK 4.1.0.GA and Android 5.0. Though the [release notes](http://docs.appcelerator.com/platform/release-notes/?version=4.1.0.GA) stated that the SDK has support in Android. Thanks.
master PR: https://github.com/appcelerator/titanium_mobile/pull/7014
PR Merged.
Closing ticket as fixed.