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

Android : Setting width of picker does not work as expected when useSpinner property is set to true

    Details

      Description

      Run the below code snippet to the issue.
      When 'useSpinner' is not used, changing width has the appropriate effect on the picker width.

      Ti.UI.backgroundColor = 'black';
      var win = Ti.UI.createWindow({
        exitOnClose: true,
        layout: 'vertical'
      });
       
      var picker = Ti.UI.createPicker({
        top:50,
        useSpinner:'true', //Comment this line to see width having effect. Works fine on iOS
        width:'75%', // Also, Ti.UI.FILL should fill up the screen. Does not work as expected on Android
      });
       
      var data = [];
      data[0]=Ti.UI.createPickerRow({title:'Bananas',width:"80%"});
      data[1]=Ti.UI.createPickerRow({title:'Strawberries',width:"80%"});
      data[2]=Ti.UI.createPickerRow({title:'Mangos',width:"80%"});
      data[3]=Ti.UI.createPickerRow({title:'Grapes',width:"80%"});
       
      picker.add(data);
      picker.selectionIndicator = true;
       
      win.add(picker);
      win.open();
       
      // must be after picker has been displayed
      picker.setSelectedRow(0, 2, false); // select Mangos
      

      Works as expected on iOS.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunila Sunila
                Reporter:
                anagesh Anirudh Nagesh
                Reviewer:
                Allen Yeung
              • Watchers:
                0 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration