Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9000] Android: Sliders must have min=0 and max=100

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-09T14:44:26.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 2.1.0, Sprint 2012-10 API
ComponentsAndroid
Labelsapi, module_slider, parity, qe-testadded
ReporterNeeraj Gupta
AssigneeVishal Duggal
Created2012-05-04T19:43:00.000+0000
Updated2012-07-09T12:06:30.000+0000

Description

This issue has been reported by a user who spent hours in figuring out that sliders on Android must have min=0 and max=100. It is a parity issue with iOS platform. We need to have this intuitive and consistent across all platforms.

Comments

  1. Vishal Duggal 2012-05-08

    Test Code
       var win = Ti.UI.createWindow({
       	backgroundColor:'white'
       });
        
       
       var slider = Titanium.UI.createSlider({
           top: 80,
           width: '80%'
           });
               
       var label = Ti.UI.createLabel({
           text: slider.value,
           width: Ti.UI.SIZE,
           height: Ti.UI.SIZE,
           top: 30,
           textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER
           });
       
       slider.addEventListener('change', function(e) {
           label.text = e.value;
       });
       
       
       win.add(label);
       win.add(slider);
        
       win.open();
       
  2. Vishal Duggal 2012-05-08

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/2150
  3. Vishal Duggal 2012-05-09

    The PR now sets defaults of min and max to 0 and 1 and Android now has support for fractional values.
  4. Natalie Huynh 2012-06-14

    Tested with Droid 3 2.3.4 with 2.1.0.v20120614102250

JSON Source