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

Android: Update header and footer view activity

    Details

      Description

      The following code crashes the app on Android, while it works fine on iOS:

      const window = Ti.UI.createWindow();
      const mapView = Ti.UI.createView({ height: 200 });
      mapView.add(require('ti.map').createView());
       
      const listView = Ti.UI.createListView({
      	headerView: mapView, // This throws the error - works fine on iOS
      	sections: [
      		Ti.UI.createListSection({
      			items: [ { title: 'Test 1' }, { title: 'Test 2' }, { title: 'Test 3' } ]
      		})
      	]
      })
       
      window.add(listView);
      window.open();
      

      The crash / stacktrace is:

      [ERROR] E/com.example.app Invalid ID 0x00000002.
      [DEBUG] AndroidRuntime: Shutting down VM
      [ERROR] TiExceptionHandler: (main) [1539,1753] No view found for id 0x2 (unknown) for fragment SupportMapFragment{b743c3e} (b6132652-63cc-4547-83f3-18d882add40a) id=0x2}
      [ERROR] TiExceptionHandler:
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:315)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1199)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1368)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1446)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1509)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:447)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2181)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2004)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1959)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1861)
      [ERROR] TiExceptionHandler:     androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:413)
      [ERROR] TiExceptionHandler:     android.os.Handler.handleCallback(Handler.java:938)
      [ERROR] TiExceptionHandler:     android.os.Handler.dispatchMessage(Handler.java:99)
      [ERROR] TiExceptionHandler:     android.os.Looper.loop(Looper.java:223)
      [ERROR] TiExceptionHandler:     android.app.ActivityThread.main(ActivityThread.java:7656)
      [ERROR] TiExceptionHandler:     java.lang.reflect.Method.invoke(Native Method)
      [ERROR] TiExceptionHandler:     com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
      [ERROR] TiExceptionHandler:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
      

      It's a blocker we currently cannot workaround, so it'd be great to have some feedback on it - maybe then we can fix it ourselves. Thank you!

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Gary Mathews
              Tester:
              Samir Mohammed
            • Watchers:
              6 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