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

Android: Unexpected layout when adding images and labels to TableViewRow

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: Release 3.0.2, Release 3.1.0
    • Fix Version/s: Release 6.2.0
    • Component/s: Android
    • Labels:
      None
    • Environment:

      TI SDK/Studio 3.0.2
      Android 4.1.1

    • Story Points:
      13
    • Sprint:
      2017 Sprint 17 SDK

      Description

      When adding an imageview and labels to a tableview row with horizontal layout will push the label down to the next line instead of wrapping the text, on iOS it will correctly wrap the text.

      Images attached

      Example code:

      var win = Ti.UI.createWindow({
      	backgroundColor: 'white'
      })
       
      var row1 = Ti.UI.createTableViewRow({
      layout: 'horizontal'
      })
       
      var image1 = Ti.UI.createImageView({
      	image: 'appicon.png',
      	height: '50',
      	width: '50'
      });
      row1.add(image1);
       
      var label1 = Ti.UI.createLabel({
      	text: 'Long text is long. Long text is long. Long text is long. Long text is long. Long text is long.',
      	color: 'black'
      });
      row1.add(label1);
       
      var label2 = Ti.UI.createLabel({
      	text: 'Long text is long. Long text is long. Long text is long. Long text is long. Long text is long.',
      	color: 'gray'
      })
      row1.add(label2);
       
      var tvRow = [];
      tvRow.push(row1);
      var tableView1 = Ti.UI.createTableView({
      		top:0, bottom:0, left:0, right:0,
      		separatorColor:'black',
      		backgroundColor: 'white',
      		data: tvRow,
      });
       
      win.add(tableView1);
      win.open();
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jbuckley Jamie Buckley
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code