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

Android: ScrollView - "ScrollToBottom" method doesn't work on Android

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 2.1.4, Release 3.0.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Tested on:
      OS: Mac OS X Lion 10.7.4
      Titanium Studio, build: 3.0.0.201210090117
      Titanium SDK, build: 3.0.0.v20121009111437
      Device: Samsung Galaxy III (4.0.4), Droid (2.2.3)

      Description

      Description:
      "ScrollToBottom" method doesn't work on Android. Touching anywhere on the screen should scroll to the bottom, as it does on iOS.

      Not a regression, the behavior exists as far back as 2.0.0 at least.

      Steps:
      1. Run the following code:

      var win = Ti.UI.createWindow({
          backgroundColor: '#fff'
      });
      var scroll = Ti.UI.createScrollView({
          contentHeight: '2000',
          scrollType: 'vertical'
      });
      scroll.add(Ti.UI.createLabel({
          text: 'Welcome to the top! Touch anywhere to scroll to bottom.', textAlign: 'center',
          color: '#000',
          width: Ti.UI.SIZE, height: Ti.UI.SIZE,
          top: 0
      }));
      scroll.add(Ti.UI.createLabel({
          text: 'Welcome to the bottom!', textAlign: 'center',
          color: '#000',
          width: Ti.UI.SIZE, height: Ti.UI.SIZE,
          bottom: 0
      }));
      scroll.addEventListener('click', function (evt) {
          if (!scroll.scrollToBottom) {
              alert('Whoops! scrollToBottom() does not exist on this platform.');
          }
          else {
              scroll.scrollToBottom();
          }
      });
      win.add(scroll);
      win.open();
      

      2. Touch anywhere on the screen to scroll to the bottom.

      Expected result:
      The scroll view should scroll to the bottom

      Actual result:
      Nothing happens

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shameerj Shameer Jan
                Reporter:
                tsmolich Tamila Smolich
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration