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

Android: MapView within TabGroup crashes as of 10.0.1

    Details

    • Story Points:
      5

      Description

      Summary:
      Displaying the "ti.map" module's MapView within a TabGroup crashes as of Titanium 10.0.1.

      This bug was caught before release.

      Steps to reproduce:

      1. Build and run the below on Android.
      2. Notice the app crashes on app startup.

      const map = require("ti.map");
      const tabWindow1 = Ti.UI.createWindow();
      tabWindow1.add(map.createView({
      	width: Ti.UI.FILL,
      	height: Ti.UI.FILL,
      }));
      const tabWindow2 = Ti.UI.createWindow();
      tabWindow2.add(Ti.UI.createLabel({ text: "Tab 2" }));
      const tabWindow3 = Ti.UI.createWindow();
      tabWindow3.add(Ti.UI.createLabel({ text: "Tab 3" }));
      const tabGroup = Ti.UI.createTabGroup({
      	tabs: [
      		Ti.UI.createTab({ title: "Tab 1", window: tabWindow1 }),
      		Ti.UI.createTab({ title: "Tab 2", window: tabWindow2 }),
      		Ti.UI.createTab({ title: "Tab 3", window: tabWindow3 }),
      	],
      });
      tabGroup.open();
      

      Cause:
      This issue was caused by the Java TiViewProxy.handleGetView() method change made by the PR below. The issue is the native tab's parent activity was never set to the actual TabGroup activity.
      https://github.com/appcelerator/titanium_mobile/pull/12909/files#diff-c1ca52b23726a03177273b78aed424203d8f5352bf7ba2022f74e2f8ad536ce3

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              jquick Joshua Quick
              Reviewer:
              Gary Mathews
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration