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

Android: Picker in scrollView not working

    Details

    • Story Points:
      1

      Description

      Issue

      Picker in scrollView not working.

      Tested on

      Android Emulator 2.2
      Droid Razr 2.3.5

      Runtime Engines

      Rhino / V8

      Steps to reproduce

      1. Run code below
      2. Click the picker

      Expected behavior

      See fully operational Pickers whose options render on screen

      Repro sequence

      Titanium.UI.setBackgroundColor('#000');
        
      var win1 = Titanium.UI.createWindow({ 
          title:'Tab 1',
          backgroundColor:'#fff'
      });
        
      var win5 = Titanium.UI.createScrollView({
          contentHeight:'auto',
          left:15,
          right:5
          ,layout:'vertical'
      });
        
        
      var names = ['Joanie', 'Mickey', 'Jean-Pierre', 'Gustav', 'Raul', 'Mimi', 'Emily', 'Sandra', 'Carrie', 'Chachi'];
      var verbs = ['loves', 'likes', 'visits', 'loathes', 'waves to', 'babysits', 'accompanies', 'teaches', 'announces', 'supports', 'knows', 'high-fives'];
        
      var rows1 = [];
      for (var i = 0; i < names.length; i++) {
          rows1.push(Ti.UI.createPickerRow({title: names[i]}));
      }
        
      var rows2 = [];
      for (i = 0; i < verbs.length; i++) {
          rows2.push(Ti.UI.createPickerRow({title: verbs[i]}));
      }
        
      var rows3 = [];
      for (i = (names.length -1); i >=0; i--) {
          rows3.push(Ti.UI.createPickerRow({title: names[i]}));
      }
        
      var column1 = Ti.UI.createPickerColumn( {
          rows: rows1, font: {fontSize: "12"}
      });
      var column2 = Ti.UI.createPickerColumn( {
          rows: rows2, font: {fontSize: "12"}
      });
      var column3 = Ti.UI.createPickerColumn( {
          rows: rows3, font: {fontSize: "12"}
      });
        
      var picker = Ti.UI.createPicker({
          useSpinner: true, visibleItems: 7,
          type : Ti.UI.PICKER_TYPE_PLAIN,
          top: 20, height: '200',
          columns: [ column1, column2, column3 ]
      });
        
      picker.addEventListener('change', function(e) {
          Ti.API.info(e.selectedValue[0] + " " + e.selectedValue[1] + " " + e.selectedValue[2]);
      });
        
      win5.add(picker);
      win1.add(win5);
        
      win1.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                thebrousse Christian Brousseau
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration