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

Android: TableView header and footer cannot be removed or resized dynamically

    Details

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

      SDK 3.1.1, 3.1.2.GA, 3.1.3.RC (updated version)
      Android 4.1.2 on Samsung Galaxy S2
      Android 2.3.3 in x86 simulator
      Mac OS X 10.8.4

    • Story Points:
      5
    • Sprint:
      2018 Sprint 06 SDK, 2018 Sprint 07 SDK, 2018 Sprint 08 SDK, 2018 Sprint 09 SDK, 2018 Sprint 10 SDK, 2018 Sprint 11 SDK

      Description

      In contrast with iOS, on Android the headerView and footerView of a TableView cannot be removed or resized (height) after once the window is opened and the table layed out.

      Since the docs do not mention any platform differences, I'd expect this to work on Android like it does on iOS.

      Steps to reproduce

      1. Create a new project: titanium create -p ios,android -n testHeader -d . --id test.header
      2. For app.js use:

            var w = Ti.UI.createWindow({
                backgroundColor: 'white'
            });
         
            var t = Ti.UI.createTableView({
                data: [
                    { title: 'One' },
                    { title: 'Two' },
                    { title: 'Three' },
                    { title: 'Four' },
                    { title: 'Five' }
                ]
            });
         
            var h = Ti.UI.createView({
                backgroundColor: 'red',
                height: 100,
                width: Ti.UI.FILL
            });
         
            h.addEventListener('click', function () {
                h.height = 50;
                f.height = 50;
            });
         
            var f = Ti.UI.createView({
                backgroundColor: 'green',
                height: 100,
                width: Ti.UI.FILL
            });
         
            f.addEventListener('click', function () {
                t.headerView = null;
                t.footerView = null;
            });
         
            t.headerView = h;
            t.footerView = f;
         
            w.add(t);
            w.open();
            

      3. Run the app on both Android and iOS devices.
      4. Tap the red headerView and notice that only on iOS it resizes both the header and footerView.
      5. Tap the green footerView and notice that only on iOS it removes both the header and footerView.

        Attachments

          Activity

            People

            • Assignee:
              jquick Joshua Quick
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Lokesh Choudhary
              Tester:
              Josh Longton
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code