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

iOS: ListView row is incorrectly sized when using INSET_GROUPED and Ti.UI.SIZE

    Details

    • Story Points:
      3
    • Sprint:
      2021 Sprint 2, 2021 Sprint 3

      Description

      Description

      When using Ti.UI.iOS.TableViewStyle.INSET_GROUPED with Ti.UI.SIZE the ListView row is incorrectly sized leading to all text in the view not being shown

      const win = Ti.UI.createWindow();
      const template = {
      	childTemplates: [
      		{
      			type: 'Ti.UI.View',
      			properties: { layout: 'horizontal', height: Ti.UI.SIZE, backgroundColor: 'blue' },
      			childTemplates: [
      				{
      					type: 'Ti.UI.View',
      					properties: { layout: 'vertical', height: Ti.UI.SIZE, backgroundColor: 'yellow', left: 0, width: 120 },
      					childTemplates: [
      						{
      							type: 'Ti.UI.Label',
      							bindId: 'startTime',
      							properties: { color: 'green', textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
      						},
      						{
      							type: 'Ti.UI.Label',
      							bindId: 'endTime',
      							properties: { color: 'red', textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }
       
      						}
      					]
      				},
      				{
      					type: 'Ti.UI.View',
      					properties: { layout: 'horizontal', height: Ti.UI.SIZE, backgroundColor: 'green', width: Ti.UI.FILL },
      					childTemplates: [
      						{
      							type: 'Ti.UI.Label',
      							bindId: 'title',
      							properties: { left: 5, color: 'red', right: 30 }
      						},
      						{
      							type: 'Ti.UI.Label',
      							bindId: 'detail',
      							properties: { right: 0, color: 'purple', font: { fontWeight: 'bold' } }
      						}
      					]
      				},
      			]
      		}
      	]
      };
      const section = Ti.UI.createListSection({
      	headerTitle: 'Example',
      	items: [{
      		startTime: { text: '10:50' },
      		endTime: { text: '11:50' },
      		title: { text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean interdum laoreet augue, scelerisque convallis dui bibendum vel. Nullam lacinia, odio ac placerat rhoncus, turpis ante venenatis nisi, sit amet auctor quam metus sed erat. Aliquam urna justo, pulvinar fermentum egestas ac, posuere non lectus. ' },
      		detail: { text: 'This text should show at the bottom' }
      	}]
      });
      win.add(Ti.UI.createListView({
      	templates: { 'mytemplate': template },
      	defaultItemTemplate: 'mytemplate',
      	sections: [section],
      	style: Titanium.UI.iOS.TableViewStyle.INSET_GROUPED
      }));
      win.open(); 
      

      Steps to reproduce

      1. Add the code above to an existing app.js
      2. Build to an iOS device or simulator

      Actual

      This text should show at the bottom is not visible when style is Titanium.UI.iOS.TableViewStyle.INSET_GROUPED

      Expected

      This text should show at the bottom should be visible

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Christopher Williams
              Tester:
              Satyam Sekhri
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration