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

Windows Phone: TableViewRow and Label layout not respected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 7.5.0
    • Fix Version/s: Release 8.1.0
    • Component/s: Windows
    • Environment:

      OS: Windows 10 Pro
      Emulator: Mobile Emulator 10.0.14393.0 720p 5 inch 1GB
      Studio: 4.8.0.201612050850
      appc 6.1.0
      Titanium SDK 6.1.0.v20170202120400

    • Story Points:
      8
    • Sprint:
      2019 Sprint 1, 2019 Sprint 3, 2019 Sprint 5

      Description

      Label View and Table Row View do not respect the layout and horizontal positions required.
      Table View Row seems to have a margin on the left and the right sides.
      The width to 100% of the Label within the Rows seems to be greater than the total width of the screen.

      Test Code

       
      var win = Ti.UI.createWindow();
       
      var tableView = Ti.UI.createTableView({
      	width: '100%',
      	left: 0,
      	backgroundColor: 'transparent',
      	separatorStyle:  Ti.UI.TABLE_VIEW_SEPARATOR_STYLE_NONE,
      	data: [],
      	borderWidth: 1, borderColor: '#FFF',
      });
      win.add(tableView);
       
       
       
      function createRow()
      {
      	
      	var uid = (new Date()).getTime();
      	
      	var row = Ti.UI.createTableViewRow({
      		height: Ti.UI.SIZE,
      		selectedBackgroundColor: '#FFFFFF',
      		layout: "vertical",
      		borderWidth: 1, borderColor: '#F0F',
      		width: '100%',
      		left: 0
      	});
      	
      	var label1 = Ti.UI.createLabel({
      		width: '80%',
      		left: 0,
      		text: 'Test 1 ' + uid,
      		height: Ti.UI.SIZE,
      		font: {
      			fontSize: 20
      		},
      		textAlign: 'left',
      		borderWidth: 1, borderColor: '#FF0'
      	});
      	row.add(label1);
      	
      	var label2 = Ti.UI.createLabel({
      		width: '80%',
      		right: 0,
      		text: 'Test 2 ' + uid + ' truncated',
      		height: Ti.UI.SIZE,
      		font: {
      			fontSize: 15
      		},
      		textAlign: 'right',
      		borderWidth: 1, borderColor: '#0F0'
      	});
      	row.add(label2);
      	
      	return row;
      }
       
       
      win.addEventListener('open', function()
      {
      	var data = [];
      	
      	data.push(createRow());
      	data.push(createRow());
      	data.push(createRow());
      	
      	tableView.setData(data);
      });
       
      win.open();
       
       
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kiguchi Kota Iguchi
                Reporter:
                sandrolain Sandro Lain
                Reviewer:
                Gary Mathews
                Tester:
                Samir Mohammed
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code