[TIMOB-18903] Android: Text entry for TextField within ListView not working correctly with Android 5.0
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2015-06-17T02:45:21.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 4.1.0 |
| Components | Android |
| Labels | listview, textfield |
| Reporter | Philippe Wueger |
| Assignee | Hieu Pham |
| Created | 2015-03-30T08:39:23.000+0000 |
| Updated | 2015-06-18T21:52:46.000+0000 |
Any update on this? Seems like a rather major issue to me. Thanks.
This happens on Android 5.1 too. Is there any progress or priority on this? This really blocks my development!
Reproduced on OnePlus One with 5.0.2
FYI, cc [~hpham]
master PR: https://github.com/appcelerator/titanium_mobile/pull/6915 additional testing code (KS needs to be tested as well):
function setupTest(win) { var data0 = [ {template:'myCell1',taskLabel:{text:'Name'}}, {template:'myCell1',taskLabel:{text:'Number'}}]; var myTemplate1 = { properties: {height: '50dp'}, childTemplates:[ { type:'Ti.UI.Label', bindId:'taskLabel', properties:{ left:0,width:'50%'} }, { type:'Ti.UI.TextField', properties:{ right:0, width:'50%', borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED, color:'black', backgroundColor:'lightgray',value:''}, } ] }; var section0 = Ti.UI.createListSection({headerTitle:'DATA ENTRY'}); section0.setItems(data0); var listView = Ti.UI.createListView({ templates:{'myCell1':myTemplate1}, sections:[section0] }); win.add(listView); } var softInput = 'none'; if (Titanium.Platform.osname == 'android') { softInput = Ti.UI.Android.SOFT_INPUT_ADJUST_PAN; } var win = Ti.UI.createWindow({ title:'Update Items', windowSoftInputMode:softInput }); setupTest(win); win.open();To get the earlier sample code working:-
var softInput = 'none'; if (Titanium.Platform.osname == 'android') { softInput = Ti.UI.Android.SOFT_INPUT_ADJUST_PAN; } var template = { childTemplates : [{// Title type : 'Titanium.UI.TextField', // Use a label for the title bindId : 'info', // Maps to a custom info property of the item data properties : {// Sets the label properties color : 'black', height : 50, left : 10, keyboardType : Titanium.UI.KEYBOARD_DEFAULT, width : 300, } }] }; var section = Ti.UI.createListSection(); var sectionData = []; for (var k = 0; k < 15; k++) { sectionData.push({ info : { hintText : 'Row ' + (k + 1) } }); } section.setItems(sectionData); var listView = Ti.UI.createListView({ sections : [section], separatorColor:'blue', templates : { 'template' : template }, defaultItemTemplate : 'template', top : 20, }); var win = Ti.UI.createWindow({ title : 'ListView', backgroundColor : '#fff', windowSoftInputMode:softInput }); win.add(listView); win.open();Verified the fix. Entering text in to a textfield within a listview now works as expected. Closing. Environment: Appc Studio : 4.1.0.201506151224 Ti SDK : 4.1.0.v20150617152826 Ti CLI : 4.0.1 Alloy : 1.6.2 MAC Yosemite : 10.10.3 Appc NPM : 4.1.0-1 Appc CLI : 4.1.0-1 Node: v0.10.37 Nexus 5 - Android 5.1.1