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

Android: Unable to add ti.map to a ListView

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Story Points:
      8
    • Sprint:
      2017 Sprint 17 SDK, 2017 Sprint 18 SDK, 2017 Sprint 19 SDK, 2017 Sprint 20 SDK, 2017 Sprint 21 SDK, 2017 Sprint 22 SDK, 2017 Sprint 23 SDK, 2017 Sprint 24 SDK, 2017 Sprint 25 SDK, 2017 Sprint 26 SDK, 2018 Sprint 01 SDK, 2018 Sprint 02 SDK, 2018 Sprint 03 SDK

      Description

      mapView should be able to be added to an existing view without error.

      var win = Ti.UI.createWindow({backgroundColor: 'gray', layout: 'vertical'});
          btn = Ti.UI.createButton({title: 'ADD MAP', height: '40dp'}),
          listView = Ti.UI.createListView(),
          sections = [],
       
          Map = require('ti.map'),
          mapView = Map.createView({
              mapType: Map.NORMAL_TYPE,
              region: {
                  latitude: 37.3680, longitude: -121.9145,
                  latitudeDelta: 0.1, longitudeDelta: 0.1
              }
          });
       
      var header = Ti.UI.createView({
              backgroundColor: 'red',
              width: Ti.UI.FILL, height: '200dp',
          }),
          numberSection = Ti.UI.createListSection({headerView: header}),
          numberData = [
              {properties: { title: 'One', color: 'white'}},
              {properties: { title: 'Two', color: 'white'}},
              {properties: { title: 'Three', color: 'white'}}
          ];
      numberSection.setItems(numberData);
      sections.push(numberSection);
      listView.sections = sections;
       
      btn.addEventListener('click', function() {
          header.add(mapView);
      });
       
      win.add(btn);
      win.add(listView);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              gmathews Gary Mathews
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • It looks like Backbone Issue Sync is not enabled for your project.

                  Git Source Code