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

Android: app crashes when Slider object it's inside a tableViewRow and has the 'value' property

    Details

      Description

      Problem description

      Application crashes when a Slider object is created specifying the 'value' property and it's placed inside a tableViewRow

      Steps to reproduce

      Run the sample code:

      var win1 = Titanium.UI.createWindow({backgroundColor:'#FFFFFF'});
       
      var ds =[];
      expandableView = Ti.UI.createView({top:0,height:40,backgroundColor:'yellow'});
       
      var slider = Titanium.UI.createSlider({
          top: 0,
          min: 0,
          max: 100,
          // width: '100%',
          value:50
          });
      expandableView.add(slider);
       
       
      var row1 = Titanium.UI.createTableViewRow({height:100});
      row1.add(expandableView);
       
      ds.push(row1);
      // 
      var tableView = Titanium.UI.createTableView({
      			data : ds,
      			scrollable : true,
      			separatorColor : 'transparent',
      			separatorStyle: 'none',
      			top:0,
      			height:80
      	});
       
      var button1 = Ti.UI.createButton({
      	title:'show slider value',
      	top: 250,
      	width:200,
      	height:80
      });
      button1.addEventListener('click', function(){
      	alert(slider.value)
      });
      win1.add(button1);
       
      var button2 = Ti.UI.createButton({
      	title:'set slider value to 50',
      	height:80,
      	width:200,
      	bottom:5
      });
      button2.addEventListener('click', function(){
      	slider.value = 50
      });
      win1.add(button2);
       
       
      win1.add(tableView);
      win1.open();
      

      Further notes:

      Comment out the 'value' property and then set it manually (for example, clicking a button).
      In this case, the value it's correctly stored and displayed.
      Adding the slider directly to the Window works. Crash only occurs when slider it's added in a tableViewRow.

      Attached the crash log file too.

      Escalated as per customer request.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                fcasali Federico Casali
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration