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

ListItem height property doesn't work at all & no where it has been mentioned how to set a fixed height


    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      Ti SDK 7.0.0.GA
      iOS 11
      Android OS >= 5


      ListItem's height property doesn't set the height of ListItem as it's mentioned in the docs at here: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ListItem-property-height

      Moreover, height property is listed as a direct property for ListItem since Ti SDK 3.1.0 instead as an accessor or inherited property, so it is simply supposed to work irrespective of any Ti SDK.

      Also, it is not mentioned anywhere that how users can set a fixed height to a list-item, so it's clueless for anyone who wants to set a fixed height.

      I have tried this stuff on Ti SDK 7.0.0.GA for both iOS & Android & it doesn't just work on any platform. I couldn't try it on older SDK as I only have 7.0.0.GA.

      Here's the very sample code picked from doc itself:

      	<Window title="List View">
      		<ListView id="list">
      	        <ListSection id="accounts">
      	            <ListItem title="Checking" height='50' />
      	            <ListItem title="Savings" />

      I have also attached a sample of how it look like on iOS 11.

      One of the user in Ti-Slack told me that it only works if we use a class property on ItemTemplate & set height, backgroundColor on class. Here's what he meant:

      <!--  even this doesn't work-->
      <ItemTemplate height="70" name='template'>
      <!-- but this works unexpectedly - add a class & set desired properties like height in this class -->
      <ItemTemplate class="saini" name='template'>
      ".saini" : { height : 70, backgroundColor:'red' }

      Then only it works but again here's a glitch that if you try to set any property directly in XML, it doesn't work. It works only through a class defined in .tss file & it also creates below log warnings:

      [WARN] :   Could not retrieve template for SIZE measurement
      [WARN] :   Could not retrieve template for SIZE measurement
      [WARN] :   Could not retrieve template for SIZE measurement
      [WARN] :   Could not retrieve template for SIZE measurement

      So, it's pretty clear that things are not working at all as they should be. Either way, there's an issue.




            • Assignee:
              prashant_saini Prashant Saini
            • Watchers:
              6 Start watching this issue


              • Created:

                Backbone Issue Sync

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

                  Git Integration