Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-17628

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 3.3.0
    • Fix Version/s: Release 6.2.0
    • Component/s: Android
    • Environment:

      Titanium SDK: 3.3.0.GA and 3.2.3.GA
      Titanium CLI: 3.3.0
      OS X Version: 10.9.3
      iOS Simulator: 7.1
      Android API Level: 17 and 19

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                farwayer Far
                Tester:
                Abir Mukherjee
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-19159
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code