Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-2395

Android: in tableview, "sections" property (SDK >= 3.0.0) not working like "data" (SDK < 3.0.0)

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Needs more info
    • Affects Version/s: None
    • Component/s: Titanium SDK & CLI
    • Environment:

      Titanium SDK version: 3.0.0GA
      Javascript Engine: V8
      Platform & version: Android 4.0.4
      Device Details: Samsung Galaxy I9100
      Host Operating System: OS X 10.7.5
      Titanium Studio version: 3.0.0

      Description

      Problem

      sections property in TableView does not work as expected. Still needed to use data property.

      Test case

      Example code provided in docs: Table View Sections

      Ti.UI.backgroundColor = 'white';
      var win = Ti.UI.createWindow();
       
      var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
      sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));
      sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));
       
      var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
      sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
      sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
       
      var table = Ti.UI.createTableView({
        // Prior to Release 3.0, add sections using the data property:
        // data: [sectionFruit, sectionVeg]
        sections: [sectionFruit, sectionVeg] // BUG
      });
       
      win.add(table);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              egomez Eduardo Gomez (Inactive)
              Reporter:
              seguri Marco Seguri
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code