Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19235

Android: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_X not working on 4.1.0 when using left and right to define width

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      SDK 4.1.0 Android 5.0

    • Story Points:
      5
    • Sprint:
      2015 Sprint 16 SDK

      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"
      }
      

        Attachments

          Activity

            People

            • Assignee:
              hpham Hieu Pham
              Reporter:
              shawnlan Shawn Lan
              Reviewer:
              Ashraf Abu (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-20155
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration