Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19235] Android: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_X not working on 4.1.0 when using left and right to define width

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-08-13T03:14:27.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelslabel
ReporterShawn Lan
AssigneeHieu Pham
Created2015-07-17T22:22:32.000+0000
Updated2017-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"
}

Comments

  1. Radamantis Torres-Lechuga 2015-07-17

    [~shawnlan] can you please attach a test case and steps to reproduce the issue? Thanks
  2. Shawn Lan 2015-07-17

    I updated the description. Please take a look.
  3. Radamantis Torres-Lechuga 2015-07-17

    [~shawnlan] we need a functional test case that reproduces the issue, can you please attach a runnable test case? Thanks
  4. Shawn Lan 2015-07-20

    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.
  5. Amimul Hossain 2015-07-21

    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.
  6. Hieu Pham 2015-08-10

    master PR: https://github.com/appcelerator/titanium_mobile/pull/7014
  7. Ashraf Abu 2015-08-13

    PR Merged.
  8. Lee Morris 2017-03-16

    Closing ticket as fixed.

JSON Source