Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16826] iOS: ListView under NavigationWindow with extendEdges and autoAdjustScrollViewInsets fails to position properly.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsiOS
Labelslistview
ReporterEd
AssigneeVijay Singh
Created2014-04-03T22:22:49.000+0000
Updated2018-11-14T19:31:52.000+0000

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

FileDateSize
1.jpg2014-04-03T22:22:49.000+000010152
2.jpg2014-04-03T22:22:49.000+000024640
3.jpg2014-04-03T22:22:49.000+00009519

Comments

  1. Jason Kotchoff 2015-06-30

    Big huge +1 for this please. It's blowing up screens with forms on them - when the keyboard shows and then hides again, parts of the screen are not longer accessible. !https://s3-ap-southeast-2.amazonaws.com/geoplus.com.au/form-1.png! !https://s3-ap-southeast-2.amazonaws.com/geoplus.com.au/form-2-keyboard.png! !https://s3-ap-southeast-2.amazonaws.com/geoplus.com.au/form-3-hidden-keyboard.png!
  2. Matthew Delmarter 2015-11-26

    +1. Not a low priority bug.

JSON Source