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

Android: Nested scrolling within disabled ScrollView are not propagated to parent

    Details

    • Story Points:
      1
    • Sprint:
      2018 Sprint 05 SDK, 2018 Sprint 04 SDK

      Description

      Summary:
      When scrolling a child view within a ScrollView, once you reach the top or bottom of the child view, the drag event is supposed to scroll the parent ScrollView. And if the parent ScrollView reaches its top or bottom, then it's drag event is supposed to be propagated to the ScrollView's parent, in case there is a ScrollView within a ScrollView. This works fine unless the inner ScrollView's "scrollingDisabled" is set false, in which case, the nested drag event is no longer bubbled up the UI tree.

      Steps to reproduce:

      1. Build and run the below code on an Android device.
      2. Scroll one of the TextArea fields up and down past the bounds of its scrollable area.

      var window = Ti.UI.createWindow();
      var rootScrollView = Ti.UI.createScrollView(
      {
      	layout: "vertical",
      	scrollType: "vertical",
      	showHorizontalScrollIndicator: false,
      	shorVerticalScrollIndicator: true,
      	width: Ti.UI.FILL,
      	height: Ti.UI.FILL,
      });
      for (var index = 1; index <= 20; index++) {
      	var innerScrollView = Ti.UI.createScrollView(
      	{
      		layout: "vertical",
      		scrollType: "vertical",
      		showHorizontalScrollIndicator: false,
      		shorVerticalScrollIndicator: true,
      		scrollingEnabled: false,
      		borderColor: "white",
      		borderWidth: "2dp",
      		top: "10dp",
      		left: "5dp",
      		bottom: "10dp",
      		right: "5dp",
      		width: Ti.UI.FILL,
      		height: Ti.UI.SIZE,
      	});
      	innerScrollView.add(Ti.UI.createLabel(
      	{
      		text: "Inner Disabled ScollView " + index,
      		bottom: "5dp",
      	}));
      	innerScrollView.add(Ti.UI.createTextArea(
      	{
      		value: "Welcome to the Appcelerator Platform! The Appcelerator Platform helps you develop cross-platform mobile applications using the Titanium SDK, Alloy, Appcelerator Studio and the Appcelerator CLI, then lets you manage the entire lifecycle of the application with debugging, testing, deploying, crash monitoring and analytic data collection.",
      		width: Ti.UI.FILL,
      		height: "100dp",
      	}));
      	rootScrollView.add(innerScrollView);
      }
      window.add(rootScrollView);
      window.open();
      

      Result:
      The outer ScrollView does not scroll when you reach the top or bottom bounds of TextArea's scroll area. (This works fine if "ScrollView.scrollEnabled" property is set true.)

      Expected Result:
      Outer ScrollView should scroll.

        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

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

                  Git Source Code