[TIMOB-25359] Android: ScrollView not scrolling when keyboard is showing
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-04T18:05:32.000+0000 |
Affected Version/s | Release 6.2.0 |
Fix Version/s | Release 6.3.0 |
Components | n/a |
Labels | 6.2.2, android, bug, consider-6.2.3, regression, scrollview |
Reporter | Guillermo Figueras |
Assignee | Gary Mathews |
Created | 2017-09-28T13:00:10.000+0000 |
Updated | 2017-10-06T21:43:58.000+0000 |
Description
When using SDK 6.2.2GA on Android, ScrollView will not scroll when the keyboard is visible after clicking on a TextField.
When using SDK 6.2.0GA or 6.1.2GA it will work correctly.
See images attached and code below.
view.xml:
<Alloy>
<Window class="container" >
<ScrollView id="scrollView" showVerticalScrollIndicator="true">
<View id="userView" >
<ImageView class="icons" image="/icons/user.png" />
<TextField id="userTxt" />
<View bottom="0" width="Titanium.UI.FILL" height="1" backgroundColor="#d3d3d3" />
</View>
<View id="passView" >
<ImageView class="icons" image="/icons/lock.png" />
<TextField id="passTxt" />
<View bottom="0" width="Titanium.UI.FILL" height="1" backgroundColor="#d3d3d3" />
</View>
<Button id="registerGmailBtn" title="L('registerGmail')" />
<View id="btns">
<Button class="smallBtns" id="loginBtn" title="L('login')" />
<Button class="smallBtns" id="registerBtn" title="L('register')" />
</View>
<Button class="smallBtns" id="legalBtn" title="L('legalNotice')" />
<Switch value="true" />
</ScrollView>
</Window>
</Alloy>
tss:
".container" : {
backgroundColor: 'white'
}
".container[platform=android]" : {
exitOnClose : true
}
"Window[platform=android]":{
theme : 'Theme.AppCompat.NoTitleBar',
windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_STATE_HIDDEN
}
"#scrollView": {
layout: 'vertical'
}
".icons" : {
left: 0,
width: "25dp",
height: "25dp"
}
"#userView" : {
top: "160dp",
width: "80%",
height: "50dp"
}
"#userTxt" : {
hintText : L('user'),
left: "10%",
right: "10%",
backgroundColor: 'transparent',
width: Titanium.UI.FILL,
hintTextColor: "grey",
color : "black"
}
"#passView" : {
width : "80%",
height : "50dp"
}
"#passTxt" : {
hintText : L('password'),
passwordMask: true,
left: "10%",
right: "10%",
backgroundColor: 'transparent',
width: Titanium.UI.FILL,
hintTextColor: "grey",
color : "black"
}
"#registerGmailBtn" : {
top: "20dp",
width: "80%"
}
"#btns" : {
top: "20dp",
height: Ti.UI.SIZE
}
".smallBtns" : {
width: "120dp"
}
"#loginBtn" : {
left: "10%"
}
"#registerBtn" : {
right: "10%"
}
"#legalBtn" : {
top: "40dp"
}
Attachments
File | Date | Size |
---|---|---|
SDK 6.1.2GA & 6.2.0GA correct.mov | 2017-09-28T12:54:20.000+0000 | 2052265 |
SDK 6.2.2GA wrong.mov | 2017-09-28T12:54:19.000+0000 | 917510 |
Here's the generated Alloy test case converted to JS that will reproduce the issue:
6_2_X: https://github.com/appcelerator/titanium_mobile/pull/9492
master: https://github.com/appcelerator/titanium_mobile/pull/9502 6_3_X: https://github.com/appcelerator/titanium_mobile/pull/9503
FR's passed, PR's merged.
Verified the fix with SDK's 6.3.0.v20171004141749 & 7.0.0.v20171004160733. Closing. Studio Ver: 4.10.0.201709271713 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.9 Appc CLI: 6.3.0-master.6 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.5 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Pixel --- Android 7.1.1