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

iOS: ListView under NavigationWindow with extendEdges and autoAdjustScrollViewInsets fails to position properly.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: Release 3.2.2
    • Fix Version/s: None
    • Component/s: iOS
    • Labels:
    • Environment:

      Ti SDK 3.2.2GA, iOS 7.1, Simulator 7.1

    • Story Points:
      8
    • Sprint:
      2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK, 2018 Sprint 10 SDK, 2018 Sprint 11 SDK, 2018 Sprint 12 SDK, 2018 Sprint 13 SDK, 2018 Sprint 14 SDK, 2018 Sprint 15 SDK, 2018 Sprint 16 SDK, 2016 Sprint 17 SDK, 2018 Sprint 18 SDK, 2018 Sprint 19 SDK, 2018 Sprint 20 SDK, 2018 Sprint 21, 2018 Sprint 22

      Description

      The extendEdges property of a window under a NavigationWindow allows the content of the window to extend under a translucent navigation bar, giving an iOS 7 depth effect.

      However, when extendEdges is defined and autoAdjustScrollViewInsets is enabled for the window, the ListView top inset shifts up if the software keyboard is shown and does not automatically adjust down after the keyboard disappears.

      Expected Behavior:

      When the soft keyboard disappears, the top inset should return back to normal and the top of list should be visible (the section header).

      Test:

      Using the code below, load the app. The initial view (pic 1) shows the header title of the list section. Tap on one of the two text fields to show the software keyboard. The list view is then shifted up (pic 2). Tap “Done” on the keyboard to close it. The list section header remains under the navigation bar (pic 3) and cannot be repositioned correctly even by puling the list view down.

      index.xml

      <Alloy>
          <NavigationWindow platform="ios">
          	<Window id="win" class="container">
          		<ListView id="lv" defaultItemTemplate="tText">
                      <Templates>            
                          <ItemTemplate id="tText" name="tText">
                              <Label id="lText" bindId="lText" />
                              <TextField id="cText" bindId="cText" />
                          </ItemTemplate>
                      </Templates>      
                      <ListSection headerTitle="Account">
                          <ListItem itemId="email" template="tText" lText:text="Email" cText:hintText="Email" />
                          <ListItem itemId="uname" template="tText" lText:text="Username" cText:hintText="Username" />
                      </ListSection>
          		</ListView>
          	</Window>
      	</NavigationWindow>
      </Alloy>
      

      index.tss

       
      "#win": {
      	 title: 'TEST'
      	,extendEdges: [Ti.UI.EXTEND_EDGE_TOP, Ti.UI.EXTEND_EDGE_BOTTOM]
      	,autoAdjustScrollViewInsets: true
      }
       
      "#lv": {
      	 style: Ti.UI.iPhone.ListViewStyle.GROUPED
      	,defaultItemTemplate: Ti.UI.LIST_ITEM_TEMPLATE_SETTINGS
      	,allowsSelection: true
      }
       
      "#tText": {
      	 selectionStyle: Ti.UI.iPhone.ListViewCellSelectionStyle.NONE
      }
       
      "#lText": {
      	  left: '15dp'
      	 ,width: '100dp'
      }
       
      "#cText": {
      	 left: '115dp'
      	,width: '160dp'
      	,height: '44dp'
      	,borderStyle: Ti.UI.INPUT_BORDERSTYLE_NONE
      	,borderWidth: 0
      	,color: '#0000FF'
      	,keyboardType: Ti.UI.KEYBOARD_DEFAULT
      	,returnKeyType: Ti.UI.RETURNKEY_DONE
      	,clearButtonMode: Ti.UI.INPUT_BUTTONMODE_NEVER
      }
      

      index.js

      $.index.open();
      

        Attachments

        1. 1.jpg
          1.jpg
          10 kB
        2. 2.jpg
          2.jpg
          24 kB
        3. 3.jpg
          3.jpg
          9 kB

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                bcproductions Ed
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Integration