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

Android: Ti.UI.SIZE height not working for ListView (SDK 6.2.X)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: Release 6.2.2
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
    • Environment:

      SDK 6.2.0 GA, 6.2.1GA, 6.2.2GA

    • Story Points:
      0
    • Sprint:
      2017 Sprint 20 SDK

      Description

      When using SDK 6.2.0GA, 6.2.1.GA or 6.2.2GA on Android, a ListView will not behave as expected when setting height to Ti.UI.SIZE.

      If I use SDK 6.1.2GA it will resize as expected.

      See images attached and code below.

      view.xml:

      <ScrollView id="scrollView" height="0" layout="vertical">
      				
        <CardView id="locationsCard" height="0" >
          <ListView id="locationsList" defaultItemTemplate="template" touchEnabled="false" >
            <Templates>
              <ItemTemplate name="template" height="Ti.UI.SIZE" width="Ti.UI.FILL"  >
                <View class="itemView" onClick="get_place">
                  <ImageView class="icons" image="/icons/location.png" touchEnabled="false" />
                    <View class="locationView" touchEnabled="false" >
                      <Label bindId="mainText" class="titleLabel smallText" touchEnabled="false" />
                      <Label bindId="secondaryText" class="subtitleLabel smallText" touchEnabled="false"  />
                    </View>
                  </View>
                  <View class="separator" bindId="separator" touchEnabled="false"  />
                </ItemTemplate>
      							
                <ItemTemplate name="template2" height="Ti.UI.SIZE" width="Ti.UI.FILL" top="8dp" bottom="8dp">
                  <View class="itemView" onClick="get_place">
                    <ImageView class="icons" image="/icons/location.png" touchEnabled="false" />
                    <View class="locationView" touchEnabled="false" >
                      <Label bindId="mainText" class="titleLabel smallText" touchEnabled="false" />
                    </View>
                  </View>
                  <View class="separator" bindId="separator" touchEnabled="false" />
                </ItemTemplate>
              </Templates>
              <ListSection id="section" backgroundColor="white" />
            </ListView>
          </CardView>
      				
        <CardView id="selectCard">
          <View layout='horizontal' backgroundColor="#fafafa" touchFeedback="true" touchFeedbackColor="#808080" onClick="selectInMap">
            <ImageView class="icons" id="locationIcon" image="/icons/address.png" touchEnabled="false"  />
            <Label class="titleLabel smallText" text="L('selectInMap')" touchEnabled="false" />
          </View>
        </CardView>
       
      </ScrollView>
      

      tss:

      'CardView': {
      	width: Ti.UI.FILL,
      	height: Ti.UI.SIZE,
      	left: "10dp",
      	right: "10dp",
      	contentPadding: 40,
      	cardCornerRadius: 20,
      	cardUseCompatPadding: true,
      	backgroundColor: "#fafafa"
      }
      ".smallText" :{
      	left: "16dp",
      	font: {
      		fontSize: "14sp"
      	}
      }
       
      ".titleLabel" : {
      	color: "#212121"
      }
       
      ".subtitleLabel" : {
      	color: "#757575"
      }
       
      "#locationsCard" : {
      	top: "10dp",
      	bottom: "10dp",
      	layout: 'vertical',
      	height: Ti.UI.SIZE
      }
       
      "#locationsList" : {
      	top: "16dp",
      	left: "16dp",
      	right: "16dp",
      	bottom: "16dp",
      	canScroll: false,
      	showVerticalScrollIndicator: false,
      	height: Ti.UI.SIZE
      }
       
      ".itemView" : {
      	top: "8dp",
      	bottom: "8dp",
      	layout: 'horizontal',
      	height: Ti.UI.SIZE,
      	backgroundColor: "#fafafa", 
      	touchFeedback: true,
      	touchFeedbackColor: "#808080"
      }
       
      ".icons" : {
      	width: "24dp",
      	height: "24dp"
      }
       
      ".locationView" : {
      	layout: 'vertical',
      	height: Ti.UI.SIZE,
      	width: Ti.UI.FILL
      }
       
      ".separator" : {
      	bottom: "0",
      	height: "1",
      	width: Ti.UI.FILL,
      	left: "40dp",
      	right: 0,
      	backgroundColor: "#d3d3d3",
      }
       
      "#selectCard" : {
      	top: "10dp",
      	bottom: "10dp",
      	height: "48dp",
      	layout: 'horizontal',
      	backgroundColor: '#fafafa'
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                gfigueras Guillermo Figueras
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code