Per the changes in TIMOB-1124, I should be able to set a backgroundGradient on a heavyweight Android window (i.e. in a tab group or purposely set)
Causes force-close. Works as expected on lightweight window.
// comment out navBarHidden and the following will work
var win = Titanium.UI.createWindow({
title:'Gradients',
navBarHidden: false,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '0%' },
endPoint: { x: '100%', y: '100%' },
colors: [ { color: '#fff', offset: 0.0}, { color: '#444', offset: 0.5 }, { color: '#fff', offset: 1.0 } ]
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]
}
});
win.add(linearGradient);
win.open();
I fixed the crash but gradient won't be applied. nativeView is never set in TiUIView in the case of heavyweight window. https://github.com/appcelerator/titanium_mobile/pull/3906
Pull request updated to fix the gradient issue
Application is not getting force closed while using backgroundGradient on heavyweight window. Verified fix on: Device : Google Nexus 4, Android Version: 4.1.1 SDK: 3.3.0.v20140425191906 CLI version : 3.3.0-dev OS : MAC OSX 10.9.2 Alloy: 1.4.0-dev ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.3.0.201404251359 titanium-code-processor: 1.1.1-alpha XCode : 5.1.1