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

Android: ellipsize not working with no width

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Duplicate
    • Affects Version/s: Release 3.2.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Android 4.x
      Ti SDK: 3.x

      Description

      On Android, ellipsize will work for single line labels, only if the width property is defined and wordWrap is set to false. However, if the width of the label is defined in terms of left and right properties, ellipsize does not work.

      Ellipsize will work for the label below:

      var win = Ti.UI.createWindow({
      	backgroundColor : "#FFF"
      });
       
      var label = Ti.UI.createLabel({
      	font : {
      		fontSize : '32dp'
      	},
      	width : '250dp',
      	height : '75dp',
      	ellipsize : true,
      	wordWrap : false,
      	html : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
      });
       
      win.add(label);
      win.open();
      

      Ellipsize will not work for the label below:

      var win = Ti.UI.createWindow({
      	backgroundColor : "#FFF"
      });
       
      var label = Ti.UI.createLabel({
      	font : {
      		fontSize : '32dp'
      	},
      	left : '10dp',
      	right : '10dip',
      	height : '75dp',
      	ellipsize : true,
      	wordWrap : false,
      	html : "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
      });
       
      win.add(label);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lchoudhary Lokesh Choudhary
                Reporter:
                kouroche Kouroche Sedaghatian
                Reviewer:
                Allen Yeung
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration