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

Android: Scrollview does not generate click events

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: Release 3.1.0
    • Component/s: Android
    • Environment:

      Description

      When a scroll view with an other view is added to a window. The Scroll view does not listen to the event. If you click on the view inside scrollview then both the view and scrollview will get the click event, but if you click on just the scroll view, the scrollview is not getting any click event. This issue is happening only in Android. It works properly in iPhone.

      Steps to Reproduce:

      1. Load the below app.js
      2. Click on the red view (The click event of both view and scrollview is getting called)
      3. Click on the yellow view (The click event of the scrollview is not getting called)

      app.js:

       
      var win = Ti.UI.createWindow({
      	backgroundColor:'white'
      });
       
      var self = Ti.UI.createView({
      	left : 0,
      	top : 0,
      	width : '50%',
      	height : '50%',
      	backgroundColor : 'red'
      });
       
      self.addEventListener('click', function(e) {
      	Ti.API.info("View has been clicked");
      });
       
      var scrollbar = Ti.UI.createScrollView({
      	left : 0,
      	top : 0,
      	width : '100%',
      	height : '100%',
      	backgroundColor : 'yellow'
      });
       
      scrollbar.addEventListener('click', function(e) {
      	Ti.API.info("Scrollbar has been clicked");
      });
       
      scrollbar.add(self);
       
       
      win.add(scrollbar);
      win.open();
      

      Tested Devices: HTC Sense Android v2.3.3

        Attachments

          Activity

            People

            • Assignee:
              sunila Sunila
              Reporter:
              soumyakantikar Soumya Kanti Kar
              Reviewer:
              Allen Yeung
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration