Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17628] Android: - ListView: different behavior while calculating height on Android and iOS (parity issue)

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-08-22T19:19:59.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sRelease 6.2.0
ComponentsAndroid
LabelsTCSupport, layout, listview
ReporterFar
AssigneeJoshua Quick
Created2014-07-31T23:18:02.000+0000
Updated2017-08-22T23:17:58.000+0000

Description

Problem Description

There is a parity issue, we have FILL ListView on iOS and SIZE ListView on Android.

Steps to reproduce

- Create a simple project. - Pase the code into app.js:
var win = Ti.UI.createWindow({backgroundColor: 'Black'});
var view = Ti.UI.createView({
	height : Ti.UI.SIZE,
	width : Ti.UI.SIZE
});
var listView = Ti.UI.createListView();
var sections = [];

var firstSection = Ti.UI.createListSection();
var firstDataSet = [
    {properties: { title: 'Hello'}},
];
firstSection.setItems(firstDataSet);
sections.push(firstSection);
listView.sections = sections;
view.add(listView);
win.add(view);
win.open();

view.addEventListener('postlayout', function(e){
	Ti.API.info(e.source.size.height);
});
Ti.API.info('Height=' + view.toImage().height);
- Test in devices (iOS and Android)

Actual Results

Output 480 on iOS and 32 on Android.

Comments

  1. jithinpv 2014-09-19

    Issue reproduces Titanium SDK version 3.4.0 master, 3.3.0.GA Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4 iOS simulator : iPhone Retina (3.5-inch), iOS 7.0.3
  2. Abir Mukherjee 2017-08-22

    Passed FR. PR merged. Changes are seen in SDK versions: 6.2.0.v20170822113609 7.0.0.v20170822142802

JSON Source