Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15494] iOS: List View backgroundGradient and selectedBackgroundGradient not working

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-10-18T07:03:04.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0
ComponentsiOS
Labelsqe-testadded
ReporterVishal Duggal
AssigneeVishal Duggal
Created2013-10-15T22:33:30.000+0000
Updated2013-10-18T07:03:04.000+0000

Description

Attachments

FileDateSize
background_gradient.PNG2013-10-18T07:02:35.000+0000107492

Comments

  1. Vishal Duggal 2013-10-15

    Test Case
       var win = Ti.UI.createWindow({backgroundColor: 'white', fullscreen: true});
       
       var search = Titanium.UI.createSearchBar({
           barColor:'#000', 
           showCancel:true,
           height:43,
           top:0,
       });
       search.addEventListener('cancel', function(){
           search.blur();
       });
       search.addEventListener('change', function(e){
           listView.searchText = e.value;
       });
       
       var listView = Ti.UI.createListView({headerView:search});
       
       var listSection = Ti.UI.createListSection();
       
       var fruits = ['Papaya', 'Peach', 'Pear', 'Persimmon', 'Pineapple', 'Pluot', 'Pomegranate'];
       
       var gradient = {
           colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.5 }, { color: 'red', offset: 1.0 } ],
           type: 'linear'
       };
       var gradient2 = {
           colors: [ { color: 'purple', offset: 0.0}, { color: 'yellow', offset: 0.5 }, { color: 'purple', offset: 1.0 } ],
           type: 'linear'
       };
       
       var data = [];
       for (var i = 0; i < fruits.length; i++) {
           data.push({
               properties: {
                   title: fruits[i],
                   searchableText: fruits[i],
                   backgroundGradient: gradient,
                   selectedBackgroundGradient: gradient2
               }
           });
       }
       
       listSection.setItems(data);
       listView.sections = [listSection];
       win.add(listView);
       
       
       var view = Ti.UI.createView({
           backgroundGradient: gradient,
           width: 100,
           height: 100,
           bottom: 0,
           left: 0
       });
       var view2 = Ti.UI.createView({
           backgroundGradient: gradient2,
           width: 100,
           height: 100,
           bottom: 0,
           right: 0
       });
       win.add(view);
       win.add(view2);
       win.open();
       
  2. Vishal Duggal 2013-10-15

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/4792
  3. Paras Mishra 2013-10-18

    backgroundGradient and selectedBackgroundGradient are working fine. Verified fix on: Device : iPhone 5 , iOS version : 7.0 SDK: 3.2.0.v20131016191202 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310170829 XCode : 5
  4. Paras Mishra 2013-10-18

    Reopened to add screenshot
  5. Paras Mishra 2013-10-18

    Added backgroundGradient.png. Its working fine.

JSON Source