Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14100] Android: element's "rect" property invalid when windowSoftInputMode is used

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-06-06T01:27:15.000+0000
Affected Version/sRelease 3.1.0
Fix Version/s2013 Sprint 12 API, 2013 Sprint 12, Release 3.1.1, Release 3.2.0
ComponentsAndroid
LabelsSupportTeam, qe-3.1.1, qe-closed-3.1.1, qe-testadded, regression
ReporterDavide Cassenti
AssigneeHieu Pham
Created2013-06-04T13:58:18.000+0000
Updated2014-06-19T12:44:04.000+0000

Description

Problem description

When using windowSoftInputMode, the dimensions returned in the postlayout event are not correct.

Steps to reproduce

Use the following code to reproduce the issue. Removing windowSoftInputMode will return the right height for the window.
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
	title:'Tab 1',
	backgroundColor:'#fff',
	windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_ADJUST_PAN
});

win1.addEventListener('postlayout', function(e) { 
	Ti.API.info('rect.height: '+e.source.rect.height);
	alert('rect.height: '+e.source.rect.height);
});

win1.open();

Notes

Works with 3.0.2

Comments

  1. Allen Yeung 2013-06-06

    https://github.com/appcelerator/titanium_mobile/pull/4358
  2. Hieu Pham 2013-06-06

    3.1.X PR : https://github.com/appcelerator/titanium_mobile/pull/4359
  3. Federico Casali 2013-06-06

    Verified as fixed with TiSDK 3.1.1.v20130606121419 on Android Galaxy Nexus 4.2.2 Closing.

JSON Source