[TIMOB-15494] iOS: List View backgroundGradient and selectedBackgroundGradient not working
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-10-18T07:03:04.000+0000 |
| Affected Version/s | Release 3.2.0 |
| Fix Version/s | 2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0 |
| Components | iOS |
| Labels | qe-testadded |
| Reporter | Vishal Duggal |
| Assignee | Vishal Duggal |
| Created | 2013-10-15T22:33:30.000+0000 |
| Updated | 2013-10-18T07:03:04.000+0000 |
Description
Attachments
| File | Date | Size |
|---|---|---|
| background_gradient.PNG | 2013-10-18T07:02:35.000+0000 | 107492 |
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();Pull pending https://github.com/appcelerator/titanium_mobile/pull/4792
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
Reopened to add screenshot
Added backgroundGradient.png. Its working fine.